diff --git a/version-gen.sh b/version-gen.sh
index a54f2af2fdaec5e36a91847c3b8f2268535de5be..ca8414d47b4afe0c7e707b729423f8b3b6f39418 100755 (executable)
--- a/version-gen.sh
+++ b/version-gen.sh
DEFAULT_VERSION="0.0.0.git"
-VERSION="$( git describe --tags 2> /dev/null | sed -e 's/foobar-//' )"
+VERSION="$( git describe --tags 2> /dev/null \
+ | sed -e 's/foobar-//' || true )"
if test -z "$VERSION"; then
VERSION="$DEFAULT_VERSION"
else
- git update-index -q --refresh
- if test -n "$( git diff-index --name-only HEAD )"; then
+ git update-index -q --refresh || true
+ if test -n "$( git diff-index --name-only HEAD || true )"; then
VERSION="$VERSION-dirty"
fi
fi