From a82fe339efe7e15a6fb26790dcc94e50bc677719 Mon Sep 17 00:00:00 2001 From: Felix Breidenstein Date: Sat, 26 Oct 2024 00:00:06 +0200 Subject: [PATCH] Better folder detection in helper.sh This way the user could symlink the helper.sh script to something like /usr/bin/ and have it in the path which allows to just call "helper.sh" everywhere in the shell. --- helper.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helper.sh b/helper.sh index fac48fa..4062877 100755 --- a/helper.sh +++ b/helper.sh @@ -3,7 +3,7 @@ set -e clear -HELPER_SCRIPT_FOLDER="$( cd "$( dirname "${0}" )" && pwd )" +HELPER_SCRIPT_FOLDER="$(dirname "$(readlink -f "$0")")" for script in "${HELPER_SCRIPT_FOLDER}/scripts/"*.sh; do . "${script}"; done for script in "${HELPER_SCRIPT_FOLDER}/scripts/menu/"*.sh; do . "${script}"; done for script in "${HELPER_SCRIPT_FOLDER}/scripts/menu/K1/"*.sh; do . "${script}"; done