From ed7a62ebab7a37f7de31e06c36cdf82b552f504f Mon Sep 17 00:00:00 2001 From: Eugene Kim Date: Thu, 21 Mar 2019 16:39:53 -0700 Subject: [PATCH] Use a rough equivalent of realpath realpath(1) is not available on macOS. (Funny, because realpath(3) originated in FreeBSD, so it came to macOS before Linux adopted it, but Linux beat macOS to realpath(1).) --- scripts/setup_bls_build_flags.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/setup_bls_build_flags.sh b/scripts/setup_bls_build_flags.sh index ece9864d8..e5af7f57d 100644 --- a/scripts/setup_bls_build_flags.sh +++ b/scripts/setup_bls_build_flags.sh @@ -11,7 +11,9 @@ gopath=$(go env GOPATH) # HMY_PATH is the common root directory of all harmony repos HMY_PATH="${gopath%%:*}/src/github.com/harmony-one" if [ ! -d $HMY_PATH ]; then - HMY_PATH=$(realpath $progdir/../..) + # "env pwd" uses external pwd(1) implementation and not the Bash built-in, + # which does not fully dereference symlinks. + HMY_PATH=$(cd $progdir/../.. && env pwd) fi : ${OPENSSL_DIR="/usr/local/opt/openssl"} : ${MCL_DIR="${HMY_PATH}/mcl"}