|
|
@ -6,15 +6,19 @@ case "${0}" in |
|
|
|
*) progdir=.;; |
|
|
|
*) progdir=.;; |
|
|
|
esac |
|
|
|
esac |
|
|
|
|
|
|
|
|
|
|
|
unset -v gopath |
|
|
|
case "${HMY_PATH+set}" in |
|
|
|
gopath=$(go env GOPATH) |
|
|
|
"") |
|
|
|
# HMY_PATH is the common root directory of all harmony repos |
|
|
|
unset -v gopath |
|
|
|
HMY_PATH="${gopath%%:*}/src/github.com/harmony-one" |
|
|
|
gopath=$(go env GOPATH) |
|
|
|
if [ ! -d $HMY_PATH ]; then |
|
|
|
# HMY_PATH is the common root directory of all harmony repos |
|
|
|
# "env pwd" uses external pwd(1) implementation and not the Bash built-in, |
|
|
|
HMY_PATH="${gopath%%:*}/src/github.com/harmony-one" |
|
|
|
# which does not fully dereference symlinks. |
|
|
|
if [ ! -d $HMY_PATH ]; then |
|
|
|
HMY_PATH=$(cd $progdir/../.. && env pwd) |
|
|
|
# "env pwd" uses external pwd(1) implementation and not the Bash built-in, |
|
|
|
fi |
|
|
|
# which does not fully dereference symlinks. |
|
|
|
|
|
|
|
HMY_PATH=$(cd $progdir/../.. && env pwd) |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
;; |
|
|
|
|
|
|
|
esac |
|
|
|
: ${OPENSSL_DIR="/usr/local/opt/openssl"} |
|
|
|
: ${OPENSSL_DIR="/usr/local/opt/openssl"} |
|
|
|
: ${MCL_DIR="${HMY_PATH}/mcl"} |
|
|
|
: ${MCL_DIR="${HMY_PATH}/mcl"} |
|
|
|
: ${BLS_DIR="${HMY_PATH}/bls"} |
|
|
|
: ${BLS_DIR="${HMY_PATH}/bls"} |
|
|
|