From d7b18a8e2d5fbd64cea3099a6ea318d0fe1b3493 Mon Sep 17 00:00:00 2001 From: pelya Date: Sat, 15 Mar 2014 19:53:53 +0200 Subject: [PATCH] Detect version from git submodule --- config.lib | 2 +- findversion.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config.lib b/config.lib index 32fe4790ce..e7c2d4e82d 100644 --- a/config.lib +++ b/config.lib @@ -1035,7 +1035,7 @@ check_params() { # of the tags folder, the folder of the tag does not have a .svn folder # anymore and this fails to detect the subversion repository checkout. log 1 "checking revision... svn detection (tag)" - elif [ -d "$ROOT_DIR/.git" ] && [ -n "`git help 2>/dev/null`" ]; then + elif [ -e "$ROOT_DIR/.git" ] && [ -n "`git help 2>/dev/null`" ]; then log 1 "checking revision... git detection" elif [ -d "$ROOT_DIR/.hg" ] && [ -n "`hg help 2>/dev/null`" ]; then log 1 "checking revision... hg detection" diff --git a/findversion.sh b/findversion.sh index d9b57aa622..6f11113e64 100755 --- a/findversion.sh +++ b/findversion.sh @@ -84,7 +84,7 @@ if [ -d "$ROOT_DIR/.svn" ] || [ -d "$ROOT_DIR/../.svn" ]; then else REV="r$REV_NR" fi -elif [ -d "$ROOT_DIR/.git" ]; then +elif [ -e "$ROOT_DIR/.git" ]; then # We are a git checkout # Refresh the index to make sure file stat info is in sync, then look for modifications git update-index --refresh >/dev/null