diff options
author | Peter Karlsson <peterk> | 2001-05-23 20:45:50 +0000 |
---|---|---|
committer | Peter Karlsson <peterk> | 2001-05-23 20:45:50 +0000 |
commit | 71fefc5eb716a9f899f0b9ee7fdde8bab17150f1 (patch) | |
tree | 2b1da529b1271416be9aa859f50cc58cd18aedef /remove_stale.pl | |
parent | 014b35253d57547fdc435d134bb6ef9a9708838e (diff) |
Handle auto-generated wml files (such as the new subscribe.wml) properly.
CVS version numbers
remove_stale.pl: 1.4 -> 1.5
Diffstat (limited to 'remove_stale.pl')
-rwxr-xr-x | remove_stale.pl | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/remove_stale.pl b/remove_stale.pl index 48946ae5003..15b78af2ae3 100755 --- a/remove_stale.pl +++ b/remove_stale.pl @@ -79,18 +79,28 @@ sub recurse { # sitemap.??.html files should be ignored since they don't have a .wml # file, except in the english dir - if (-f $direntry && $direntry =~ /\.html$/ && $direntry !~ /sitemap\...\.html$/) + if (-f $direntry && $direntry =~ /\.html$/ && $direntry !~ /sitemap\..*\.html$/) { my ($haswml, $incvs) = (0, 0); # Check for WML file. my $source = $direntry; $source =~ s/\...(-..)?\.html$/.wml/; - my $wmlfile; - WMLS: foreach $wmlfile (@wmlfiles) + if ($source =~ /wml$/) { - $haswml = 1, last WMLS - if $wmlfile eq $source; + my $wmlfile; + WMLS: foreach $wmlfile (@wmlfiles) + { + $haswml = 1, last WMLS + if $wmlfile eq $source; + } + + unless ($haswml) + { + # Check if WML file is in the directory, even if it is + # not in the CVS (for auto-generated WML files). + $haswml =1 if -f $source; + } } unless ($haswml) |