diff --git a/init/eessi_archdetect.sh b/init/eessi_archdetect.sh index 4dd2436cc1..3f0adf6938 100755 --- a/init/eessi_archdetect.sh +++ b/init/eessi_archdetect.sh @@ -88,7 +88,7 @@ cpupath(){ *) log "ERROR" "cpupath: Unsupported CPU architecture $machine_type" esac # spec files are located in a subfolder with this script - local base_dir=$(dirname $(realpath $0)) + local base_dir=$(dirname $(readlink -f $0)) update_arch_specs "$base_dir/arch_specs/${spec_file}" # Identify the host CPU vendor diff --git a/init/eessi_environment_variables b/init/eessi_environment_variables index 784dd6c13c..933826011a 100644 --- a/init/eessi_environment_variables +++ b/init/eessi_environment_variables @@ -1,6 +1,6 @@ # this script is *sourced*, not executed, so can't rely on $0 to determine path to self # $BASH_SOURCE points to correct path, see also http://mywiki.wooledge.org/BashFAQ/028 -EESSI_INIT_DIR_PATH=$(dirname $(realpath $BASH_SOURCE)) +EESSI_INIT_DIR_PATH=$(dirname $(readlink -f $BASH_SOURCE)) function error() { echo -e "\e[31mERROR: $1\e[0m" >&2 diff --git a/init/minimal_eessi_env b/init/minimal_eessi_env index f938d1dd10..8dff836f90 100644 --- a/init/minimal_eessi_env +++ b/init/minimal_eessi_env @@ -2,7 +2,7 @@ # # this script is *sourced*, not executed, so can't rely on $0 to determine path to self # $BASH_SOURCE points to correct path, see also http://mywiki.wooledge.org/BashFAQ/028 -EESSI_INIT_DIR_PATH=$(dirname $(realpath $BASH_SOURCE)) +EESSI_INIT_DIR_PATH=$(dirname $(readlink -f $BASH_SOURCE)) # set up defaults: EESSI_CVMFS_REPO, EESSI_VERSION # script takes *_OVERRIDEs into account