diff --git a/mkreleasehdr.sh b/mkreleasehdr.sh index ea3b35a58..c458e6480 100755 --- a/mkreleasehdr.sh +++ b/mkreleasehdr.sh @@ -1,5 +1,5 @@ #!/bin/sh -GIT_SHA1=$(git show-ref --head --hash=8 2> /dev/null | head -n1) +GIT_SHA1=$( (git show-ref --head --hash=8 2> /dev/null || echo 00000000) | head -n1) GIT_DIRTY=$(git diff 2> /dev/null | wc -l) test -f release.h || touch release.h (cat release.h | grep SHA1 | grep $GIT_SHA1) && \