summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9c6bfc2)
raw | patch | inline | side by side (parent: 9c6bfc2)
author | Sebastian Harl <sh@tokkee.org> | |
Sat, 1 May 2010 20:26:43 +0000 (22:26 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Sat, 1 May 2010 20:26:43 +0000 (22:26 +0200) |
version-gen.sh | patch | blob | history |
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