aboutsummaryrefslogtreecommitdiffstats
path: root/git-version-gen
diff options
context:
space:
mode:
authorDaniel Willmann <dwillmann@sysmocom.de>2018-07-24 17:51:58 +0200
committerdaniel <dwillmann@sysmocom.de>2018-07-25 07:03:14 +0000
commitb920c4fefd012c8e85aec635755625227bf6f491 (patch)
tree6008b81241a79723682db6facd3351b1ba78fb33 /git-version-gen
parent437e2093110c4f9bd4f1512cb0ee0064a09612e4 (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: I4385cc4fb87ca4354a3c608a18aa3d2eb03a744f
Diffstat (limited to 'git-version-gen')
-rwxr-xr-xgit-version-gen4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-version-gen b/git-version-gen
index 8e59c5af..42cf3d2b 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]*) ;;