summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Willmann <dwillmann@sysmocom.de>2018-07-24 17:51:58 +0200
committerDaniel Willmann <daniel@totalueberwachung.de>2018-07-24 18:03:20 +0200
commit6265190fc611e468cebadb4eaf41ceb2f7e2095b (patch)
treedc9894527e5cdd558f0c97b40040bf75647f4c8f
parentb3d32cd25efc05f1b6a2266767070b14e6d8966f (diff)
git-version-gen: Don't check for .git directory
This check is not in all our repos that use git-version-gen. Indeed it seems to be a leftover of openbsc where I think it wanted to ensure being called in the openbsc subfolder or something? libosmocore e.g. doesn't have it. In any case .git being a directory is not always true (if using git worktree) so remove this check. Change-Id: Ic14561f3b041bb94d1b60e477b18e37077ce4c32
-rwxr-xr-xgit-version-gen4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-version-gen b/git-version-gen
index 8e59c5a..42cf3d2 100755
--- a/git-version-gen
+++ b/git-version-gen
@@ -92,8 +92,8 @@ fi
if test -n "$v"
then
: # use $v
-elif test -d ./.git \
- && v=`git describe --abbrev=4 --match='v*' HEAD 2>/dev/null \
+elif
+ v=`git describe --abbrev=4 --match='v*' HEAD 2>/dev/null \
|| git describe --abbrev=4 HEAD 2>/dev/null` \
&& case $v in
[0-9]*) ;;