From 68b1ce1dc3605a8b79594ba5e8e29577ea6dc42c Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Mon, 15 Aug 2022 21:52:13 -0700 Subject: [PATCH] Only run git describe if .git exists in the $srcdir. --- mkgitver | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mkgitver b/mkgitver index 49aa150b..43156c65 100755 --- 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 -- 2.47.2