Fetch INIT_DIR to fix run script PATHs 00/74100/1
authorThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 17 Jul 2018 00:13:46 +0000 (20:13 -0400)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 17 Jul 2018 00:14:27 +0000 (20:14 -0400)
Scripts in local-init.sh fail due to ./script.sh being the
wrong path for those scripts.

Change-Id: I653547908c67a30caf53160d16e72fa2c4979504
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
jenkins-init-scripts/local-init.sh

index c4b2d9b81848da8343ce2bf58be8b1d8a9b34b5c..d55974cae491e060aedf2156cb01708dd9ea541e 100755 (executable)
@@ -9,7 +9,8 @@
 # http://www.eclipse.org/legal/epl-v10.html
 ##############################################################################
 
-./system_type.sh
+INIT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
+"${INIT_DIR}/system_type.sh"
 # shellcheck disable=SC1091
 source /tmp/system_type.sh
-"./${SYSTEM_TYPE}.sh"
+"${INIT_DIR}/${SYSTEM_TYPE}.sh"