changeset 14093:bae3b310c970

git-version-gen: include command name in one more diagnostic * build-aux/git-version-gen: When the required .tarball-version file was missing or unreadable, you might see the diagnostic from "cat", but no trace of the name of the invoking script. Now, you still see the diagnostic from cat, but also get one from "git-version-gen: ". Inspired by a patch from Bruce Korb.
author Jim Meyering <meyering@redhat.com>
date Mon, 03 Jan 2011 11:50:43 +0100
parents 53c8f6f49c64
children 14bd4f47ae3f
files ChangeLog build-aux/git-version-gen
diffstat 2 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2011-01-03  Jim Meyering  <meyering@redhat.com>
 
+	git-version-gen: include command name in one more diagnostic
+	* build-aux/git-version-gen: When the required .tarball-version file
+	was missing or unreadable, you might see the diagnostic from "cat",
+	but no trace of the name of the invoking script.  Now, you still see
+	the diagnostic from cat, but also get one from "git-version-gen: ".
+	Inspired by a patch from Bruce Korb.
+
 	update-copyright: adjust test to match changed code
 	* tests/test-update-copyright.sh: Change test's expected output
 	to match new actual output.
--- a/build-aux/git-version-gen
+++ b/build-aux/git-version-gen
@@ -1,6 +1,6 @@
 #!/bin/sh
 # Print a version string.
-scriptversion=2010-10-13.20; # UTC
+scriptversion=2011-01-03.10; # UTC
 
 # Copyright (C) 2007-2011 Free Software Foundation, Inc.
 #
@@ -85,14 +85,14 @@
 # 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` || v=
     case $v in
 	*$nl*) v= ;; # reject multi-line output
 	[0-9]*) ;;
 	*) v= ;;
     esac
     test -z "$v" \
-	&& echo "$0: WARNING: $tarball_version_file seems to be damaged" 1>&2
+	&& echo "$0: WARNING: $tarball_version_file is missing or damaged" 1>&2
 fi
 
 if test -n "$v"