]> Savannah Git Hosting - gnulib.git/commitdiff
ensure that unreadable file error messages include program name
authorBruce Korb <bkorb@gnu.org>
Sun, 2 Jan 2011 19:58:30 +0000 (11:58 -0800)
committerBruce Korb <bkorb@gnu.org>
Sun, 2 Jan 2011 19:58:30 +0000 (11:58 -0800)
build-aux/git-version-gen

index 3c6900e59a2a39b620527d48754cf4925550b232..df2414a97aef2a1c39737d83b84eb68fce5baa3e 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 # Print a version string.
-scriptversion=2010-12-30.20; # UTC
+scriptversion=2011-01-02.18; # UTC
 
 # Copyright (C) 2007-2010 Free Software Foundation, Inc.
 #
@@ -85,7 +85,10 @@ v=
 # then try "git describe", then default.
 if test -f $tarball_version_file
 then
-    v=`cat $tarball_version_file` || exit 1
+    v=`cat $tarball_version_file 2>&1` || {
+        echo "$0 error: unreadable tarball version file $1:  $v" >&2
+        exit 1
+    }
     case $v in
        *$nl*) v= ;; # reject multi-line output
        [0-9]*) ;;