]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
build: .git may be a file
authorVincent Bernat <vincent@bernat.im>
Wed, 9 Sep 2015 15:06:34 +0000 (17:06 +0200)
committerVincent Bernat <vincent@bernat.im>
Wed, 9 Sep 2015 15:09:25 +0000 (17:09 +0200)
It happens when using a worktree.

Makefile.am
autogen.sh
get-version

index 7728212a28d1b9262e602af6ca5111fdd750f1da..78978d054e1615b70d8598b8f1ad6e98782d9bfa 100644 (file)
@@ -16,7 +16,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 ; \
index 95eec1db1873667775d19fb34657f8c56100eab4..13b53906fe5ea8182a06510ae752e7083db423cf 100755 (executable)
@@ -2,7 +2,7 @@
 
 set -e
 
-[ ! -d .gitmodules ] || {
+[ ! -e .gitmodules ] || {
     echo "autogen.sh: updating git submodules"
     git submodule init
     git submodule update
index b7019beb88c4adcfa5cef50a2ba7afcbd42a77a7..5c118094363fb8f5339e418ff4a5f8b76c92f535 100755 (executable)
@@ -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)