[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] git-version-gen: include command name in one more diagnostic
From: |
Bruce Korb |
Subject: |
Re: [PATCH] git-version-gen: include command name in one more diagnostic |
Date: |
Mon, 03 Jan 2011 06:25:07 -0800 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101125 SUSE/3.0.11 Thunderbird/3.0.11 |
On 01/03/11 06:09, Bruce Korb wrote:
> Please notice that before "cat" runs, the file is tested for existence.
> When "cat" does run, any error message goes to stderr and is thus
> separated from the ``echo "$0: WARNING:..." stuff. I put them together
> into a single well-ordered output. Also, "is missing" is not possible.
So, beit bad data or bad media, the data are damaged:
diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen
index c337673..9d09b4b 100755
--- a/build-aux/git-version-gen
+++ b/build-aux/git-version-gen
@@ -85,14 +85,17 @@ v=
# then try "git describe", then default.
if test -f $tarball_version_file
then
- v=`cat $tarball_version_file` || v=
+ v=`cat $tarball_version_file 2>&1` || {
+ echo "$0: error: $tarball_version_file is unreadable" >&2
+ exit 1
+ }
case $v in
*$nl*) v= ;; # reject multi-line output
[0-9]*) ;;
*) v= ;;
esac
test -z "$v" \
- && echo "$0: WARNING: $tarball_version_file is missing or damaged" 1>&2
+ && echo "$0: WARNING: $tarball_version_file is damaged" 1>&2
fi
if test -n "$v"
- [PATCH] git-version-gen: include command name in one more diagnostic, Jim Meyering, 2011/01/03
- Re: [PATCH] git-version-gen: include command name in one more diagnostic, Bruce Korb, 2011/01/03
- Re: [PATCH] git-version-gen: include command name in one more diagnostic,
Bruce Korb <=
- Re: [PATCH] git-version-gen: include command name in one more diagnostic, Jim Meyering, 2011/01/03
- Re: [PATCH] git-version-gen: include command name in one more diagnostic, Bruce Korb, 2011/01/03
- Re: [PATCH] git-version-gen: include command name in one more diagnostic, Jim Meyering, 2011/01/03
- Re: [PATCH] git-version-gen: include command name in one more diagnostic, Bruce Korb, 2011/01/03
- Re: [PATCH] git-version-gen: include command name in one more diagnostic, Jim Meyering, 2011/01/03
- Re: [PATCH] git-version-gen: include command name in one more diagnostic, Ben Pfaff, 2011/01/03
- Re: [PATCH] git-version-gen: include command name in one more diagnostic, Ralf Wildenhues, 2011/01/03
- Re: [PATCH] git-version-gen: include command name in one more diagnostic, Jim Meyering, 2011/01/03
- Re: [PATCH] git-version-gen: include command name in one more diagnostic, Ben Pfaff, 2011/01/03
- Re: [PATCH] git-version-gen: include command name in one more diagnostic, Bruce Korb, 2011/01/03