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:
parent
bfafec3ebf
commit
8d2fc95d17
@ -13,7 +13,7 @@ then
|
|||||||
git update-index --refresh > /dev/null 2>&1
|
git update-index --refresh > /dev/null 2>&1
|
||||||
VERSION=`git describe --abbrev=4 --match='v[0-9]*' --dirty 2>/dev/null`
|
VERSION=`git describe --abbrev=4 --match='v[0-9]*' --dirty 2>/dev/null`
|
||||||
VERSION=`echo "$VERSION" | sed 's/^v//'`
|
VERSION=`echo "$VERSION" | sed 's/^v//'`
|
||||||
[ -n "$VERSION" ] && echo -n "$VERSION" > "$VERFILE"
|
[ -n "$VERSION" ] && printf "%s" "$VERSION" > "$VERFILE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "$VERFILE" ]
|
if [ -f "$VERFILE" ]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user