From: Martin Schwenke Date: Wed, 5 Feb 2020 01:07:55 +0000 (+1100) Subject: ctdb-tests: Make $ctdb_dir absolute X-Git-Tag: ldb-2.1.1~119 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b0b14e4eddab78ef71bc6d39f016e4a18929fd64;p=thirdparty%2Fsamba.git ctdb-tests: Make $ctdb_dir absolute This is used to set several variables so it might as well be cd-proof. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/tests/scripts/script_install_paths.sh b/ctdb/tests/scripts/script_install_paths.sh index 2bd8542e4b7..9e54f4b473a 100644 --- a/ctdb/tests/scripts/script_install_paths.sh +++ b/ctdb/tests/scripts/script_install_paths.sh @@ -5,9 +5,9 @@ if ! $CTDB_TESTS_ARE_INSTALLED ; then die "Tests not installed but can't find run_tests.sh" fi - ctdb_dir=$(dirname "$CTDB_TEST_DIR") + ctdb_dir=$(cd -P "$(dirname "$CTDB_TEST_DIR")" && pwd) # real path - top_dir=$(cd -P "$ctdb_dir" && echo "$PWD") # real path + top_dir="$ctdb_dir" if [ ! -d "${top_dir}/bin" ] ; then top_dir=$(dirname "$top_dir") fi