summaryrefslogtreecommitdiffstats
path: root/git-version-gen
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2023-04-30 14:13:37 +0200
committerGravatar Nikias Bassen2023-04-30 14:13:37 +0200
commit8bfb6484df9c0a2ff73a8e23bada85e957a43c67 (patch)
tree28084b38a5b0548ce378e8b12d0b37404558a1bd /git-version-gen
parentf1ff5caef3732062c62fdfdf38f4087fff15adb0 (diff)
downloadideviceinstaller-8bfb6484df9c0a2ff73a8e23bada85e957a43c67.tar.gz
ideviceinstaller-8bfb6484df9c0a2ff73a8e23bada85e957a43c67.tar.bz2
git-version-gen: Prevent multiple lines of output
Diffstat (limited to 'git-version-gen')
-rwxr-xr-xgit-version-gen3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-version-gen b/git-version-gen
index 3eb6a42..d868952 100755
--- a/git-version-gen
+++ b/git-version-gen
@@ -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"