bug-gnulib
[Top][All Lists]
Advanced

[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:09:53 -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

Hi Jim,

On 01/03/11 02:56, Jim Meyering wrote:
> @@ -85,14 +85,14 @@ 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` || 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

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.

Thanks - Bruce



reply via email to

[Prev in Thread] Current Thread [Next in Thread]