From: Ben Pfaff Date: Mon, 8 Feb 2010 05:33:18 +0000 (-0800) Subject: extract gnulib commit number too X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e69ef9cf2879acc8bd4c4b53099af8f75e982ef9;p=pspp extract gnulib commit number too --- diff --git a/build-pspp b/build-pspp index 7c60f22d7f..8180ddd80c 100755 --- a/build-pspp +++ b/build-pspp @@ -97,7 +97,17 @@ EOF 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 () { + ($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 {