From b0b14e4eddab78ef71bc6d39f016e4a18929fd64 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Wed, 5 Feb 2020 12:07:55 +1100 Subject: [PATCH] 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 --- ctdb/tests/scripts/script_install_paths.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.47.2