Skip to content

Commit

Permalink
Merge branch 'fix/allow-for-readlink-on-macos-fallback' into 'master'
Browse files Browse the repository at this point in the history
fix: Fallback to readlink if macOS missing greadlink

See merge request hepmc/HepMC3!360
  • Loading branch information
Andrii Verbytskyi committed Aug 23, 2024
2 parents 578f28e + c39fca9 commit 17d89b8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion HepMC3-config.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@
## @configure_input@
#The line below assures at least some relocation.
if [ "$(uname)" == "Darwin" ]; then
PACKAGE_BIN_DIR=$(dirname $(greadlink -f $0))
# greadlink is only available through 'brew install coreutils'
if [ ! -z "$(command -v greadlink)" ]; then
PACKAGE_BIN_DIR=$(dirname $(greadlink -f $0))
else
PACKAGE_BIN_DIR=$(dirname $(readlink -f $0))
fi
else
PACKAGE_BIN_DIR=$(dirname $(readlink -f $0))
fi
Expand Down

0 comments on commit 17d89b8

Please sign in to comment.