diff options
| author | Jakob Unterwurzacher | 2017-02-19 20:14:46 +0100 | 
|---|---|---|
| committer | Jakob Unterwurzacher | 2017-02-19 20:14:46 +0100 | 
| commit | 10361a907acaa1126b27113789069a74ae7d5ccc (patch) | |
| tree | cdd68baa4d8deb97aeadb0f6af58c11e15b47bbd | |
| parent | 7fbe69bfa67ad7794d58c113be84093dc8b76d5a (diff) | |
build.bash: GOPATH may be unset since Go v1.8. Handle it.
| -rwxr-xr-x | build.bash | 9 | 
1 files changed, 7 insertions, 2 deletions
| @@ -4,8 +4,13 @@ set -eu  cd "$(dirname "$0")" -# GOPATH may contain multiple paths separated by ":" -GOPATH1=$(echo $GOPATH | cut -f1 -d:) +# Starting with Go v1.8, GOPATH may be unset. $HOME/go is used instead. +if [[ -z ${GOPATH:-} ]] ; then +	GOPATH1=$HOME/go +else +	# GOPATH may contain multiple paths separated by ":" +	GOPATH1=$(echo $GOPATH | cut -f1 -d:) +fi  # gocryptfs version according to git  GITVERSION=$(git describe --tags --dirty) | 
