changeset 14125:b1cfb22df170

ensure that unreadable file error messages include program name
author Bruce Korb <bkorb@gnu.org>
date Sun, 02 Jan 2011 11:58:30 -0800
parents ff9ca89936a2
children 7e5e308a46ce
files build-aux/git-version-gen
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/build-aux/git-version-gen
+++ b/build-aux/git-version-gen
@@ -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 @@
 # 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]*) ;;