]> git.samba.org - rsync.git/commitdiff
Only run git describe if .git exists in the $srcdir.
authorWayne Davison <wayne@opencoder.net>
Tue, 16 Aug 2022 04:52:13 +0000 (21:52 -0700)
committerWayne Davison <wayne@opencoder.net>
Tue, 16 Aug 2022 04:52:13 +0000 (21:52 -0700)
mkgitver

index 49aa150bee666701e2dbcc53a1766414fa1da85d..43156c652a801ea25604bf4497b4660f3219deb9 100755 (executable)
--- a/mkgitver
+++ b/mkgitver
@@ -1,7 +1,10 @@
 #!/bin/sh
 
 srcdir=`dirname $0`
-gitver=`git describe --abbrev=8 2>/dev/null`
+
+if [ -e "$srcdir/.git" ]; then
+    gitver=`git describe --abbrev=8 2>/dev/null`
+fi
 
 if [ ! -f git-version.h ]; then
     touch git-version.h