]>
git.saurik.com Git - redis.git/blob - mkreleasehdr.sh
ea3b35a585a333b8953db29e65fa0fb1b2644b4c
2 GIT_SHA1
=$(git show-ref --head --hash=8 2> /dev/null | head -n1)
3 GIT_DIRTY
=$(git diff 2> /dev/null | wc -l)
4 test -f release.h
|| touch release.h
5 (cat release.h
| grep SHA1
| grep $GIT_SHA1) && \
6 (cat release.h
| grep DIRTY
| grep $GIT_DIRTY) && exit 0 # Already uptodate
7 echo "#define REDIS_GIT_SHA1 \"$GIT_SHA1\"" > release.h
8 echo "#define REDIS_GIT_DIRTY \"$GIT_DIRTY\"" >> release.h
9 touch redis.c
# force recompile of redis.c