12345678910111213141516171819202122232425 |
- From c7518550fc8b0e62f1c7ea96495eec621bc395ef Mon Sep 17 00:00:00 2001
- From: orbea <orbea@fredslev.dk>
- Date: Sun, 9 Dec 2018 13:42:49 -0800
- Subject: [PATCH] getver.sh: Only use git if its a git repo.
- ---
- getver.sh | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
- diff --git a/getver.sh b/getver.sh
- index 7bb1889..45261dd 100755
- --- a/getver.sh
- +++ b/getver.sh
- @@ -2,7 +2,9 @@
-
- ver=unknown
-
- -[ -n "`which git`" ] && ver=`git describe`
- +if [ -n "`which git`" ] && git rev-parse HEAD 2>/dev/null; then
- + ver=`git describe`
- +fi
-
- cat > include/version.h << EOF
- #ifndef VER_H
|