[Bio] / FigKernelScripts / Packager.pl Repository:
ViewVC logotype

Diff of /FigKernelScripts/Packager.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1, Tue Aug 16 22:38:36 2005 UTC revision 1.2, Wed Aug 17 02:37:07 2005 UTC
# Line 42  Line 42 
42    
43  Temporary files in the directory tree are skipped when scanning or packaging. A file  Temporary files in the directory tree are skipped when scanning or packaging. A file
44  is considered temporary if its name ends in a tilde (C<~>) or pound sign C<#>,  is considered temporary if its name ends in a tilde (C<~>) or pound sign C<#>,
45  or it has an extension of C<.bak> or C<.tgz>.  or it has an extension of C<.bak> or C<.tgz>. In addition, directories with names
46    ending in C<.old> will be skipped.
47    
48  =cut  =cut
49    
# Line 275  Line 276 
276              # These are counters for various file types.              # These are counters for various file types.
277              tempCount => 0,              tempCount => 0,
278              dirCount => 0,              dirCount => 0,
279                dirSkip => 0,
280              foundCount => 0              foundCount => 0
281          };          };
282  }  }
# Line 304  Line 306 
306              # Here we've found a real file. Now we need to check for a temporary file name.              # Here we've found a real file. Now we need to check for a temporary file name.
307              if ($nextName =~ /(~|#|\.bak|\.tgz)$/) {              if ($nextName =~ /(~|#|\.bak|\.tgz)$/) {
308                  # We have a temporary file name, so we count it and keep going.                  # We have a temporary file name, so we count it and keep going.
309                  $dirObject->{tempCount}++;                  $dirObject->{dirSkip}++;
310              } else {              } else {
311                  # Here we have a non-temporary name, so we're done.                  # Here we have a non-temporary name, so we're done.
312                  $done = 1;                  $done = 1;
# Line 316  Line 318 
318                  my ($path, $suffix) = NameParse($nextName);                  my ($path, $suffix) = NameParse($nextName);
319                  $dirObject->{suffix} = lc $suffix;                  $dirObject->{suffix} = lc $suffix;
320              }              }
321            } elsif ($nextName =~ /\.old$/) {
322                # Here we have a backup directory.
323                $dirObject->{dirSkip}++;
324          } else {          } else {
325              # Here we have a directory. We need to push all its members on the stack.              # Here we have a directory. We need to push all its members on the stack.
326              # Note that file names beginning with a period are ignored.              # Note that file names beginning with a period are ignored.
# Line 342  Line 347 
347      my $dirCount = $dirObject->{dirCount};      my $dirCount = $dirObject->{dirCount};
348      my $tempCount = $dirObject->{tempCount};      my $tempCount = $dirObject->{tempCount};
349      my $foundCount = $dirObject->{foundCount};      my $foundCount = $dirObject->{foundCount};
350      return "$foundCount files found, $tempCount temporary files ignored, $dirCount directories processed.\n";      my $dirSkip = $dirObject->{dirSkip};
351        return "$foundCount files found, $tempCount temporary files ignored, $dirCount directories processed, $dirSkip directories skipped.\n";
352  }  }
353    
354  =head3 NameParse  =head3 NameParse

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3