]> git.donarmstrong.com Git - debbugs.git/commitdiff
Modify dir and list assignment to be a single map
authorDon Armstrong <don@volo>
Mon, 9 Oct 2006 06:18:10 +0000 (23:18 -0700)
committerDon Armstrong <don@volo>
Mon, 9 Oct 2006 06:18:10 +0000 (23:18 -0700)
scripts/gen-indices.in

index 4991df0b6c210ddcaf9e0245aa61becaee684c67..b96b99b29da4711af685e03bb05e2bec0e7bc3f7 100755 (executable)
@@ -138,8 +138,8 @@ while (my $dir = shift @dirs) {
        my @subdirs = readdir(DIR);
        closedir(DIR);
 
-       my @list = map { s/\.summary$//; $_ } grep { m/^\d+\.summary$/ } @subdirs;
-       push @dirs, map { "$dir/$_" } grep { m/^\d+$/ } @subdirs;
+       my @list = map { m/^(\d+)\.summary$/?($1):() } @subdirs;
+       push @dirs, map { m/^(\d+)$/ && -d "$dir/$1"?("$dir/$1"):() } @subdirs;
 
        for my $f (@list) {
                print "Up to $cnt bugs...\n" if (++$cnt % 100 == 0 && $verbose);