rename ("$fullname.new", $fullname)
or die "rename $fullname.new to $fullname failed: $!\n";
-
+ # Get Gnulib commit number.
+ my $gnulib_commit;
+ $fullname = "$builddir/pspp$buildnumber/README.Git";
+ open (README_GIT, '<', $fullname)
+ or die "opening $fullname failed: $!\n";
+ while (<README_GIT>) {
+ ($gnulib_commit) = /^\s+commit ([0-9a-fA-F]{8,})/ and last;
+ }
+ die "$fullname does not specify a Git commit number\n"
+ if !defined ($gnulib_commit);
+ print "\tGNULIB_REVISION=$gnulib_commit\n";
}
sub usage {