build.bash: GOPATH may be unset since Go v1.8. Handle it.
This commit is contained in:
parent
7fbe69bfa6
commit
10361a907a
@ -4,8 +4,13 @@ set -eu
|
|||||||
|
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
# GOPATH may contain multiple paths separated by ":"
|
# Starting with Go v1.8, GOPATH may be unset. $HOME/go is used instead.
|
||||||
GOPATH1=$(echo $GOPATH | cut -f1 -d:)
|
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
|
# gocryptfs version according to git
|
||||||
GITVERSION=$(git describe --tags --dirty)
|
GITVERSION=$(git describe --tags --dirty)
|
||||||
|
Loading…
Reference in New Issue
Block a user