git-version-gen: Do not use echo -n

`echo -n` is non-portable and does not work under some operating
systems, such as OS X. Replace it with printf.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
Lukas Fleischer 2016-01-25 21:59:29 +01:00
parent bfafec3ebf
commit 8d2fc95d17

View File

@ -13,7 +13,7 @@ then
git update-index --refresh > /dev/null 2>&1
VERSION=`git describe --abbrev=4 --match='v[0-9]*' --dirty 2>/dev/null`
VERSION=`echo "$VERSION" | sed 's/^v//'`
[ -n "$VERSION" ] && echo -n "$VERSION" > "$VERFILE"
[ -n "$VERSION" ] && printf "%s" "$VERSION" > "$VERFILE"
fi
if [ -f "$VERFILE" ]