From: Vincent Bernat Date: Wed, 9 Sep 2015 15:06:34 +0000 (+0200) Subject: build: .git may be a file X-Git-Tag: 0.7.17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fb700b0966c918c058d384c6b2dd3ed7eb53410a;p=thirdparty%2Flldpd.git build: .git may be a file It happens when using a worktree. --- diff --git a/Makefile.am b/Makefile.am index 7d3b0e29..101af8c6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -12,7 +12,7 @@ doc_DATA = ChangeLog __force-changelog-generation: ChangeLog: __force-changelog-generation - $(AM_V_GEN)if test -d $(top_srcdir)/.git; then \ + $(AM_V_GEN)if test -e $(top_srcdir)/.git; then \ prev=$$(git describe --tags --always --match '[0-9]*' 2> /dev/null) ; \ for tag in $$(git tag | $(EGREP) '^[0-9]+(\.[0-9]+){1,}$$' | sort -t. -k 1,1nr -k 2,2nr -k 3,3nr); do \ if [ x"$$prev" = x ]; then prev=$$tag ; fi ; \ diff --git a/autogen.sh b/autogen.sh index 95eec1db..13b53906 100755 --- a/autogen.sh +++ b/autogen.sh @@ -2,7 +2,7 @@ set -e -[ ! -d .gitmodules ] || { +[ ! -e .gitmodules ] || { echo "autogen.sh: updating git submodules" git submodule init git submodule update diff --git a/get-version b/get-version index b7019beb..5c118094 100755 --- a/get-version +++ b/get-version @@ -29,7 +29,7 @@ if [ -f .dist-version ]; then # Get the version from the file distributed in the tarball. version=$(cat .dist-version) -elif [ -d .git ]; then +elif [ -e .git ]; then # Ger the version from the git repository. version=$(git describe --tags --always --match [0-9]* 2> /dev/null)