# HG changeset patch # User Bruce Korb # Date 1293998310 28800 # Node ID b1cfb22df1704140b6dadcd160e63c0638fc629f # Parent ff9ca89936a2a547fcc858b837a87da12ca2dba7 ensure that unreadable file error messages include program name diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen --- 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]*) ;;