From: Mathias Lafeldt Date: Fri, 22 Oct 2010 11:24:29 GMT Subject: [PATCH 3/3] GIT-VERSION-GEN: style nitpicks Message-ID: <4CC1746D.5070907@debugon.org> In-Reply-To: - remove superfluous semicolon - simplify version comparison - remove empty lines at end of file Signed-off-by: Mathias Lafeldt --- GIT-VERSION-GEN | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index 427d5d6..60bef5a 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -18,7 +18,7 @@ elif test -d .git -o -f .git && v[0-9]*) : ;; esac then - VN=$(echo "$VN" | sed -e 's/-/./g'); + VN=$(echo "$VN" | sed -e 's/-/./g') else VN="$DEF_VER" fi @@ -31,9 +31,9 @@ then else VC=unset fi -test "$VN" = "$VC" || { + +if test "$VN" != "$VC" +then echo >&2 "GIT_VERSION = $VN" echo "GIT_VERSION = $VN" >$GVF -} - - +fi -- 1.7.3.2