From c7dadd15131c2d9cd8f3db468c060c37a4bf1714 Mon Sep 17 00:00:00 2001 From: antirez Date: Tue, 18 May 2010 16:39:57 +0200 Subject: [PATCH] git hash 00000000 in reelase.h when git is not found enabled again after some shell scripting fix that is now compatible with most shells --- mkreleasehdr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkreleasehdr.sh b/mkreleasehdr.sh index ea3b35a5..c458e648 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) && \ -- 2.47.2