From e337e9e89add1dd4ffd9966eabfc120a1cdf99e2 Mon Sep 17 00:00:00 2001 From: Simon Mudd Date: Fri, 30 Dec 2016 12:39:49 +0100 Subject: [PATCH] Fix build.sh which would not run correctly if run from a different directory --- build.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index b7b9ae2ab..c9f4b0559 100755 --- a/build.sh +++ b/build.sh @@ -6,6 +6,7 @@ # set -e +mydir=$(dirname $0) RELEASE_VERSION= RELEASE_SUBVERSION= TOPDIR=/tmp/orchestrator-release @@ -80,7 +81,7 @@ function oinstall() { builddir="$1" prefix="$2" - cd $(dirname $0) + cd $mydir gofmt -s -w go/ rsync -qa ./resources $builddir/orchestrator${prefix}/orchestrator/ rsync -qa ./conf/orchestrator-sample.* $builddir/orchestrator${prefix}/orchestrator/ @@ -155,7 +156,7 @@ function main() { build_only=$4 if [ -z "${RELEASE_VERSION}" ] ; then - RELEASE_VERSION=$(cat RELEASE_VERSION) + RELEASE_VERSION=$(cat $mydir/RELEASE_VERSION) fi RELEASE_VERSION="${RELEASE_VERSION}${RELEASE_SUBVERSION}"