From cfc43685a4a0511098dca132d42b44d099bd50c8 Mon Sep 17 00:00:00 2001 From: o9000 Date: Mon, 26 Jun 2017 22:46:17 +0200 Subject: [PATCH] ChangeLog is in the same directory of get_version.sh, get it from there --- get_version.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/get_version.sh b/get_version.sh index 69b6815..2143381 100755 --- a/get_version.sh +++ b/get_version.sh @@ -33,10 +33,11 @@ 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 ${2}ChangeLog || head -n 1 ../ChangeLog) | cut -d ' ' -f 2) + SCRIPT_DIR=$(dirname "$0") + VERSION=$(head -n 1 "${SCRIPT_DIR}/ChangeLog" | cut -d ' ' -f 2) if [ "$VERSION" = "master" ] then - VERSION=$VERSION-$( (head -n 1 ${2}ChangeLog || head -n 1 ../ChangeLog) | cut -d ' ' -f 1) + VERSION=$VERSION-$(head -n 1 "${SCRIPT_DIR}/ChangeLog" | cut -d ' ' -f 1) fi fi