[DDTP-it] (fwd) ddts-script 0.4.11
Nella speranza che questo comodo script di Nicolas, il coordinatore di
DDTP-fr, si diffonda sempre più fra noi, comincio a spedire in lista le
patch.
----- Forwarded message from Nicolas Bertolissio <nico.bertol@wanadoo.fr> -----
Date: Sat, 26 Jan 2002 14:46:59 +0100
From: Nicolas Bertolissio <nico.bertol@wanadoo.fr>
Subject: ddts-script 0.4.11
To: ddts <grisu-td-coors@auric.debian.org>
User-Agent: Mutt/1.3.25i
Hello,
changelog:
version 0.4.11
- change: use a regexp to clean files, to add compatibility with other
scripts (l10n-check)
You must add the following line in your ~/.ddts-script:
$clean_re = "~\$|\.$old_e\$|\.bak\$"; # regexp for clean command
Patch is attached, full script is here:
http://perso.wanadoo.fr/nico.bertol/ddts/ddts-script.txt
I send this here, as I do on -l10n-french, so coordinators can forward
to their teams.
for information:
l10n-check is a script to check for some common mistakes, it's here:
http://perso.wanadoo.fr/nico.bertol/l10n-check
if you want to try it, and use it, don't ask for help on this list as it
is not ddts specific.
Nicolas
--
--- ddts-script_0.4.10.txt Sat Jan 12 12:00:18 2002
+++ ddts-script_0.4.11.txt Sat Jan 26 14:32:06 2002
@@ -25,6 +25,7 @@
$mail_charset,
$comment,
+ $clean_re,
$debug,
$editor);
@@ -32,17 +33,17 @@
# Read the config file
my $void = $ENV{HOME}."/.ddts-script"; # config file
-die "You must define \$tr_dir, \$rev_dir, \$bug_dir, \$temp_dir, \$comment, \$todo_e,"
- ."\$tr_e, \$rev_e, \$bug_e, \$fix_e, \$sent_e, \$old_e, \$ok_r, \$debug, \$mail_addr,"
- ."\$mail_from, \$mail_self, \$mail_enc, \$mail_charset, \$editor Perl variables in"
- ."\$HOME/.ddts-script" unless -r $void;
+die "You must define \$tr_dir, \$rev_dir, \$bug_dir, \$temp_dir, \$comment, \$todo_e,\n"
+ ."\$tr_e, \$rev_e, \$bug_e, \$fix_e, \$sent_e, \$old_e, \$ok_e, \$clean_re, \$debug,\n"
+ ."\$mail_addr, \$mail_from, \$mail_self, \$mail_enc, \$mail_charset, \$editor Perl\n"
+ ."variables in \$HOME/.ddts-script" unless -r $void;
scalar eval `cat $void`; # get the variables
# Test if variables are defined
foreach (qw(tr_dir rev_dir bug_dir temp_dir
todo_e tr_e rev_e bug_e fix_e sent_e old_e ok_e
mail_addr mail_from mail_self mail_enc mail_charset
- comment debug editor)) {
+ comment clean_re debug editor)) {
eval "\$void=\$$_";
die "\$$_ not defined in \$HOME/.ddts-script" unless ($void ne "");
}
@@ -237,6 +238,8 @@
=item I<$comment>, comment string for review, a space character will be added to this string [>>]
+=item I<$clean_re>, regular expression to remove file with I<clean> command [~\$|\.$old_e\$|\.bak\$]
+
=item I<$debug>, verbosity level (see below) [1]
=item I<$editor>, editor command, must contain `B<%s>' for the filename [$ENV{EDITOR} %s]
@@ -277,7 +280,7 @@
=cut
-my $version = "0.4.10";
+my $version = "0.4.11";
# Test if configuration as been made
foreach ($tr_dir, $bug_dir, $rev_dir, $temp_dir) {
@@ -1333,8 +1336,7 @@
foreach (&ls_dir($tr_dir)) {
next if /^\./;
- &remove_file("$tr_dir/$_") if /\.$old_e$/;
- &remove_file("$tr_dir/$_") if /\~$/;
+ &remove_file("$tr_dir/$_") if /$clean_re/;
s/\..*$//;
if (-e "$tr_dir/$_.$todo_e") {
@@ -1346,15 +1348,13 @@
foreach (&ls_dir($bug_dir)) {
next if /^\./;
- &remove_file("$bug_dir/$_") if /\.$old_e$/;
- &remove_file("$bug_dir/$_") if /\~$/;
+ &remove_file("$bug_dir/$_") if /$clean_re/;
}
foreach (&ls_dir($rev_dir)) {
next if /^\./;
- &remove_file("$rev_dir/$_") if /\.$old_e$/;
- &remove_file("$rev_dir/$_") if /\~$/;
+ &remove_file("$rev_dir/$_") if /$clean_re/;
s/\..*$//;
if (-e "$rev_dir/$_.$todo_e") {
----- End forwarded message -----
--
L.Cappelletti@mail.com - DDTP-it coordinator
Fingerprint: 8CDD 3408 53B2 6122 99DA EE37 1523 68FC D906 4C08
Reply to: