From e69ef9cf2879acc8bd4c4b53099af8f75e982ef9 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sun, 7 Feb 2010 21:33:18 -0800 Subject: [PATCH] extract gnulib commit number too --- build-pspp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 { -- 2.30.2