From a58719902b6dfe920d977affacff3774e04cb27a Mon Sep 17 00:00:00 2001 From: Karl-Hermann Wieners <karl-hermann.wieners@mpimet.mpg.de> Date: Fri, 26 Apr 2024 10:42:36 +0200 Subject: [PATCH] importexp: handle relative run script paths properly --- importexp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/importexp b/importexp index 46639d1..923b4ae 100755 --- a/importexp +++ b/importexp @@ -58,12 +58,7 @@ do RUN_SCRIPT_BASE=${RUN_SCRIPT_BASE#exp.} RUN_SCRIPT_BASE=${RUN_SCRIPT_BASE%.*} - RUN_BASE_DIR=$(dirname $RUN_SCRIPT) - case "$RUN_BASE_DIR" in - /*) ;; - .) RUN_BASE_DIR=$PWD ;; - ./*) RUN_BASE_DIR=$PWD${RUN_BASE_DIR#.} ;; - esac + RUN_BASE_DIR=$(realpath -L $(dirname $RUN_SCRIPT)) RUN_BASE_DIR=${RUN_BASE_DIR%/$CUSTOM_SUBDIR} MODEL_BASE_DIR=${BUILD_DIR:-$RUN_BASE_DIR} -- GitLab