Fix for Molecule images build-all.sh
ansible/test/images/docker/build-all.sh works only if executed under folder where script is located.
Change-Id: Ic91656656788a48bdd12cb8003e875011a71cbe3
Issue-ID: OOM-1829
Signed-off-by: Mateusz Pilat <m.pilat@partner.samsung.com>
diff --git a/ansible/test/images/docker/build-all.sh b/ansible/test/images/docker/build-all.sh
index dd5db09..dcaaf82 100755
--- a/ansible/test/images/docker/build-all.sh
+++ b/ansible/test/images/docker/build-all.sh
@@ -19,9 +19,9 @@
# COPYRIGHT NOTICE ENDS HERE
BUILD_SCRIPT=${1:-build.sh}
-
+SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
# Run all build scripts in direct subdirectories
-for buildfile in $(find -mindepth 2 -maxdepth 2 -name ${BUILD_SCRIPT});
+for buildfile in $(find ${SCRIPTPATH} -mindepth 2 -maxdepth 2 -name ${BUILD_SCRIPT});
do
pushd $(dirname ${buildfile})
. ${BUILD_SCRIPT}