From ab7185e4ad45ffad522c707e9179b926ed2a2b65 Mon Sep 17 00:00:00 2001 From: Adam Farley Date: Tue, 17 Dec 2024 13:22:11 +0000 Subject: [PATCH] fixing file locator code Signed-off-by: Adam Farley --- lib/tests/functionLibraryTests.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/tests/functionLibraryTests.sh b/lib/tests/functionLibraryTests.sh index e0e77cb86..0972ee2dd 100644 --- a/lib/tests/functionLibraryTests.sh +++ b/lib/tests/functionLibraryTests.sh @@ -16,12 +16,8 @@ scriptLocation=$0 scriptDir="${scriptLocation%/*}/" -[[ ! -x "${scriptDir}" ]] && echo "D1: ${scriptDir}" -[[ ! "${scriptDir}" =~ .*tests/$ ]] && echo "D2: ${scriptDir}" -[[ ! -x "${scriptDir}" || ! "${scriptDir}" =~ .*tests/$ ]] && echo "D3: ${scriptDir}" [[ ! -x "${scriptDir}" || ! "${scriptDir}" =~ .*tests/$ ]] && scriptDir="./" -[[ ! -x "${scriptDir}/../functionLibrary.sh" ]] && echo "D4: ${scriptDir} $(ls ${scriptDir}/..)" -[[ ! -x "${scriptDir}/../functionLibrary.sh" ]] && echo "Error: Please launch this script with a full path, or from within the test directory." && exit 1 +[[ ! `ls "${scriptDir}/.." | grep functionLibraryx.sh` ]] && echo "Error: Please launch this script with a full path, or from within the test directory." && exit 1 source "${scriptDir}/../functionLibrary.sh"