]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Check that a git archive actually exists as well as the git app being installed.
authorMike Brady <4265913+mikebrady@users.noreply.github.com>
Tue, 6 Jul 2021 18:24:51 +0000 (19:24 +0100)
committerMike Brady <4265913+mikebrady@users.noreply.github.com>
Tue, 6 Jul 2021 18:24:51 +0000 (19:24 +0100)
configure.ac

index 541ec999cf7ca3430822bffbc3785b71b9f43512..5e4cf24454f5578b594c2b96b8e760cc9c2a90b3 100644 (file)
@@ -9,11 +9,10 @@ AC_CONFIG_HEADERS([config.h])
 AC_PROG_RANLIB
 
 AC_CHECK_PROGS([GIT], [git])
-if test -n "$GIT"; then
+if test -n "$GIT" && test -e ".git/index" ; then
   AC_DEFINE([CONFIG_USE_GIT_VERSION_STRING], 1, [Use the version string produced by running 'git describe --dirty'.])
 fi
-AM_CONDITIONAL([USE_GIT_VERSION], [test -n "$GIT"])
-
+AM_CONDITIONAL([USE_GIT_VERSION], [test -n "$GIT" && test -e ".git/index" ])
 
 # Derived from the Avahi configure.ac file
 # Specifying the OS type, defaulting to linux.