summaryrefslogtreecommitdiff
path: root/mkreleasehdr.sh
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2010-05-18 16:39:57 +0200
committerantirez <antirez@gmail.com>2010-05-18 16:39:57 +0200
commitc7dadd15131c2d9cd8f3db468c060c37a4bf1714 (patch)
tree10949cc412d58fbd4a6c9a1eb358b25566404181 /mkreleasehdr.sh
parent274e45e365a484ba0b3a957ead8c420484d6fca9 (diff)
downloadredis-c7dadd15131c2d9cd8f3db468c060c37a4bf1714.tar.gz
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
Diffstat (limited to 'mkreleasehdr.sh')
-rwxr-xr-xmkreleasehdr.sh2
1 files changed, 1 insertions, 1 deletions
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) && \