From ad7faaab8180744d89f554ac224bab74626dbbf3 Mon Sep 17 00:00:00 2001 From: o9000 Date: Mon, 26 Jun 2017 10:23:50 +0200 Subject: [PATCH] Make get_version.sh work in the current dir instead of build --- get_version.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/get_version.sh b/get_version.sh index 6302a4c..2b73fd3 100755 --- a/get_version.sh +++ b/get_version.sh @@ -33,10 +33,10 @@ then fi VERSION=$(git describe --exact-match 2>/dev/null || echo "$MAJOR-git$(git show -s --pretty=format:%ci | cut -d ' ' -f 1 | tr -d '-').$(git show -s --pretty=format:%h)")$DIRTY else - VERSION=$(head -n 1 ChangeLog || head -n 1 ../ChangeLog | cut -d ' ' -f 2) + VERSION=$( (head -n 1 ChangeLog || head -n 1 ../ChangeLog) | cut -d ' ' -f 2) if [ "$VERSION" = "master" ] then - VERSION=$VERSION-$(head -n 1 ChangeLog || head -n 1 ../ChangeLog | cut -d ' ' -f 1) + VERSION=$VERSION-$( (head -n 1 ChangeLog || head -n 1 ../ChangeLog) | cut -d ' ' -f 1) fi fi