- Timestamp:
- Aug 1, 2009, 3:20:35 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/locker/sbin/parallel-find.pl
r1284 r1285 28 28 } 29 29 30 sub old_version ($) { 31 my $dirname = shift; 32 open my $h, "$dirname/.scripts-version"; 33 return (<$h>)[-1]; 34 } 35 30 36 sub version ($) { 31 37 my $dirname = shift; 32 open my $h, "$dirname/.scripts -version";38 open my $h, "$dirname/.scripts/version"; 33 39 return (<$h>)[-1]; 34 40 } … … 38 44 my $homedir = shift; 39 45 40 open my $files, "find $homedir/web_scripts -xdev -name .scripts-version 2>/dev/null |";46 open my $files, "find $homedir/web_scripts -xdev -name .scripts-version -o -name .scripts 2>/dev/null |"; 41 47 open my $out, ">$dump/$user"; 42 48 while (my $f = <$files>) { 43 49 chomp $f; 44 $f =~ s!/\.scripts-version$!!; 50 my $old_style; 51 $old_style = ($f =~ s!/\.scripts-version$!!); 52 if (! $old_style) { 53 $f =~ s!/\.scripts$!!; 54 } 45 55 if (! updatable($f)) { 46 56 print STDERR "not updatable: $f"; 47 57 next; 48 58 } 49 $v = version($f);59 $v = $old_style ? old_version($f) : version($f); 50 60 print $out "$f:$v"; 51 61 }
Note: See TracChangeset
for help on using the changeset viewer.