From: Wayne Davison Date: Tue, 16 Aug 2022 04:52:13 +0000 (-0700) Subject: Only run git describe if .git exists in the $srcdir. X-Git-Tag: v3.2.6~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=68b1ce1dc3605a8b79594ba5e8e29577ea6dc42c;p=thirdparty%2Frsync.git Only run git describe if .git exists in the $srcdir. --- 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