aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Kraai <kraai>2004-05-27 17:34:00 +0000
committerMatt Kraai <kraai>2004-05-27 17:34:00 +0000
commite7aec00a5a332c003247eae7fd09a3da7816ae9d (patch)
tree8fa71e5e64290742f49872735415e24e4d90d32d
parent35ab1855150fb9ba24047a30e3c6f4e236215074 (diff)
Rename touch_old_files.pl to touch_files.pl and make it touch files
for which translations have been removed. CVS version numbers touch_files.pl: INITIAL -> 1.1 touch_old_files.pl: 1.4 -> 1.5(DEAD)
-rwxr-xr-xtouch_files.pl (renamed from touch_old_files.pl)13
1 files changed, 7 insertions, 6 deletions
diff --git a/touch_old_files.pl b/touch_files.pl
index e4d320370fe..ed1a85f63cb 100755
--- a/touch_old_files.pl
+++ b/touch_files.pl
@@ -23,8 +23,8 @@ sub obtain_files
return unless -s "$config{'datadir'}/wmlfiles";
if (open (IN, "diff -0 $config{'datadir'}/wmlfiles.old $config{'datadir'}/wmlfiles|")) {
while (<IN>) {
- next until (/^> \.\//);
- s/^> \.\///;
+ next until (/^[<>] \.\//);
+ s/^[<>] \.\///;
chomp ();
push (@list, $_);
}
@@ -41,8 +41,9 @@ unless (getopts('d')) {
print <<_END_;
Usage: $0 [-d]
-This script finds new translations and touches the old translations so they
-rebuild and include a link to the new ones.
+This script finds new translations and translations that have been
+removed and touches the translations so they rebuild and include a
+link to the new ones and remove links to old ones.
-d Remove files, just not report.
_END_
@@ -51,9 +52,9 @@ _END_
make_listing ();
-@new_files = obtain_files ();
+@files = obtain_files ();
-foreach $file (@new_files) {
+foreach $file (@files) {
@components = split (/\//, $file);
shift @components;
my $cmd = "touch */" . join '/', @components;

© 2014-2024 Faster IT GmbH | imprint | privacy policy