Skip to content

Commit

Permalink
Merge pull request #430 from TopRichard/nessi-2023.06-readlink-realpath
Browse files Browse the repository at this point in the history
Use readlink -f instead of realpath (CentOS6)
  • Loading branch information
TopRichard authored Jul 23, 2024
2 parents 447576b + 840077f commit 42f3490
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion init/eessi_archdetect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion init/eessi_environment_variables
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion init/minimal_eessi_env
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 42f3490

Please sign in to comment.