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.
This commit is contained in:
Felix Breidenstein 2024-10-26 00:00:06 +02:00 committed by fleaz
parent 2f2ace9ee4
commit a82fe339ef
No known key found for this signature in database
GPG key ID: AED15F8FDD04D083

View file

@ -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