mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-24 10:02:29 +01:00
ca2703577e
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
24 lines
588 B
Diff
24 lines
588 B
Diff
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
|