From 68594d8bd42ce852ed36b6146edd1a6ddef2f140 Mon Sep 17 00:00:00 2001 From: Eugene Kim Date: Fri, 25 Jan 2019 16:55:20 -0800 Subject: [PATCH] If unset, take default GOPATH from go env --- 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 9cb62b7f2..cdff751c0 100644 --- a/scripts/setup_bls_build_flags.sh +++ b/scripts/setup_bls_build_flags.sh @@ -1,6 +1,8 @@ # no shebang; to be sourced from other scripts -HMY_PATH=$GOPATH/src/github.com/harmony-one +unset -v gopath +gopath=$(go env GOPATH) +HMY_PATH="${gopath}/src/github.com/harmony-one" export CGO_CFLAGS="-I$HMY_PATH/bls/include -I$HMY_PATH/mcl/include" export CGO_LDFLAGS="-L$HMY_PATH/bls/lib" export LD_LIBRARY_PATH=$HMY_PATH/bls/lib:$HMY_PATH/mcl/lib