git-version-gen: Prevent multiple lines of output

This commit is contained in:
Nikias Bassen
2023-04-30 14:13:37 +02:00
parent f1ff5caef3
commit 8bfb6484df
+2 -1
View File
@@ -3,7 +3,7 @@ SRCDIR=`dirname $0`
if test -n "$1"; then
VER=$1
else
if test -d "${SRCDIR}/.git" && test -x "`which git`" ; then
if test -r "${SRCDIR}/.git" && test -x "`which git`" ; then
git update-index -q --refresh
if ! VER=`git describe --tags --dirty 2>/dev/null`; then
COMMIT=`git rev-parse --short HEAD`
@@ -16,4 +16,5 @@ else
fi
fi
fi
VER=`printf %s "$VER" | head -n1`
printf %s "$VER"