aboutsummaryrefslogtreecommitdiff
path: root/system/radeontop/git.patch
blob: e3fbfc50420b07ed1fdae635f94a482972fa96a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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