diff --git a/share/genbuild.sh b/share/genbuild.sh index e1062bafe..b3f9d250a 100755 --- a/share/genbuild.sh +++ b/share/genbuild.sh @@ -25,7 +25,11 @@ if [ -e "$(which git 2>/dev/null)" -a "$(git rev-parse --is-inside-work-tree 2>/ # if latest commit is tagged and not dirty, then override using the tag name - suspect DESC=$(git describe 2>/dev/null) RAWDESC=$(git describe --abbrev=0 2>/dev/null) - git diff-index --quiet HEAD -- || DESC="$DESC-dirty" + if git diff-index --quiet HEAD; then + DESC="$DESC-dirty" + else: + DESC="$DESC" + fi # get a string like "2012-04-10 16:27:19 +0200" LAST_COMMIT_DATE="$(git log -n 1 --format="%ci")"