path: root/openbsc/git-version-gen
diff options
authorDaniel Willmann <dwillmann@sysmocom.de>2018-07-24 17:51:58 +0200
committerDaniel Willmann <dwillmann@sysmocom.de>2018-07-24 18:11:27 +0200
commit226fc011fc3141ecf6d3bbe43015de7fe812be38 (patch)
tree0ee085c5e2b96c68502dde1621e5f569a3bb2012 /openbsc/git-version-gen
parentde4418fb8e5a27f65b575b200763cfe06224d405 (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: Ibc8c0d8e74bb03bfe87d6f8b9ef6e74c0c889d0f
Diffstat (limited to 'openbsc/git-version-gen')
1 files changed, 2 insertions, 2 deletions
diff --git a/openbsc/git-version-gen b/openbsc/git-version-gen
index f2ad4a762..42cf3d2bd 100755
--- a/openbsc/git-version-gen
+++ b/openbsc/git-version-gen
@@ -92,8 +92,8 @@ fi
if test -n "$v"
: # use $v
-elif test -d ./../.git \
- && v=`git describe --abbrev=4 --match='v*' HEAD 2>/dev/null \
+ v=`git describe --abbrev=4 --match='v*' HEAD 2>/dev/null \
|| git describe --abbrev=4 HEAD 2>/dev/null` \
&& case $v in
[0-9]*) ;;