From fbbe4df459729dff08acfd2eb91c445e1f0169c8 Mon Sep 17 00:00:00 2001 From: "Hahn Axel (hahn)" <axel.hahn@unibe.ch> Date: Wed, 19 Feb 2025 10:36:35 +0100 Subject: [PATCH] env_init: use BASH_SOURCE to detect file name when script is sourced --- shellscripts/env_init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shellscripts/env_init.sh b/shellscripts/env_init.sh index 2449d990..dea59a52 100755 --- a/shellscripts/env_init.sh +++ b/shellscripts/env_init.sh @@ -10,7 +10,7 @@ # 2024-02-18 first lines <axel.hahn@unibe.ch> # ====================================================================== -cd "$( dirname "$0")" || exit 1 +cd "$( dirname "${BASH_SOURCE[0]}")" || exit 1 typeset -A aJava typeset -A aMaven -- GitLab