Changeset 1384 for trunk/locker/sbin
- Timestamp:
- Dec 22, 2009, 6:05:14 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/locker/sbin/parallel-find.pl
r1372 r1384 55 55 sub version ($) { 56 56 my $dirname = shift; 57 open my $h, "$dirname/.scripts/version"; 58 return (<$h>)[-1]; 57 $uid = stat($dirname)->uid; 58 open my $h, "sudo -u #$uid git describe --tags 2>/dev/null |"; 59 chomp($val = <$h>); 60 return $val; 59 61 } 60 62 … … 67 69 while (my $f = <$files>) { 68 70 chomp $f; 69 my $ old_style;70 $ old_style = ($f =~ s!/\.scripts-version$!!);71 if (! $ old_style) {72 $f =~ s!/\.scripts $!!;71 my $new_style; 72 $new_style = ($f =~ s!/\.scripts$!!); 73 if (! $new_style) { 74 $f =~ s!/\.scripts-version$!!; 73 75 } 74 76 if (! updatable($f)) { … … 76 78 next; 77 79 } 78 $v = $ old_style ? old_version($f) :version($f);80 $v = $new_style ? version($f) : old_version($f); 79 81 print $out "$f:$v"; 80 82 }
Note: See TracChangeset
for help on using the changeset viewer.