aboutsummaryrefslogtreecommitdiffstats
path: root/remove_stale.pl
diff options
context:
space:
mode:
authorDavid Prévot <taffit-guest>2011-05-03 20:01:01 +0000
committerDavid Prévot <taffit-guest>2011-05-03 20:01:01 +0000
commit09b3b4b2cc75ac96af62e9865c7d4bccc6f767b5 (patch)
tree83a7477a219257dfe4779822cd42e56e3825ac79 /remove_stale.pl
parent2587fa608c26d4d560ff58dd064797b97f8374ed (diff)
Push exceptions where they belong (and thus stop removing every Spanish l10n files each time they are built), and activate the cleanup for every languages
CVS version numbers remove_stale.pl: 1.21 -> 1.22
Diffstat (limited to 'remove_stale.pl')
-rwxr-xr-xremove_stale.pl17
1 files changed, 9 insertions, 8 deletions
diff --git a/remove_stale.pl b/remove_stale.pl
index 970480f7a64..7d9a0bd6070 100755
--- a/remove_stale.pl
+++ b/remove_stale.pl
@@ -45,8 +45,6 @@ use constant INSTALLDIR => '../www';
# Read the list of languages
my @languages = sort Webwml::Langs->new()->names();
- #@languages = ('spanish');
- @languages = ('dutch','spanish');
# check all subdirs to find stale html files
my @files;
@@ -121,12 +119,6 @@ sub find_stale_files
# started translations
return 0 unless -d $dir;
- # Don't try to do anything in subdirectories of l10n.
- return 0 if $dir =~ m'l10n/[^/]+$';
-
- # Don't try to do anything in stats either.
- return 0 if $dir =~ m'stats$';
-
# create a list of *.html files and a hash of *.wml files in this translation
#my (%wmlfiles,@htmlfiles);
#find( sub { $wmlfiles{$File::Find::name}++ if -f and /\.wml$/ }, $dir );
@@ -146,6 +138,15 @@ sub find_stale_files
$source =~ s/(?:\.[-\w]+)?\.html$/.wml/
or die("Can't determine WML source file for `$htmlfile'");
+ # Don't try to do anything in subdirectories of l10n.
+ next if $htmlfile =~ m{/international/l10n/po[-\w]*/[\w_\@]+\.[-\w]+\.html$};
+
+ # Don't try to do anything in stats either.
+ next if $htmlfile =~ m{/devel/website/stats/[-\w]+\.[-\w]+\.html$};
+
+ # Don't try to remove yaboot-howto.
+ next if $htmlfile =~ m{/ports/powerpc/inst/yaboot-howto.html};
+
# does the wml source file exist?
my $haswml = exists( $wmlfiles{$source} ) || -f $source || 0;

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