extract gnulib commit number too
authorBen Pfaff <blp@gnu.org>
Mon, 8 Feb 2010 05:33:18 +0000 (21:33 -0800)
committerBen Pfaff <blp@gnu.org>
Mon, 8 Feb 2010 05:33:18 +0000 (21:33 -0800)
build-pspp

index 7c60f22d7faf3a69a832cd2dd853e5667bb7e0f7..8180ddd80c1d289ac3785f0b833e4ccf7b902b79 100755 (executable)
@@ -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 (<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 {