aboutsummaryrefslogtreecommitdiff
path: root/build.bash
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-06-29 22:27:32 +0200
committerJakob Unterwurzacher2016-06-29 22:27:32 +0200
commitffc000943b33724b1df0db69af35123abb1331a8 (patch)
tree00cf2a89b3fc10e1f93d84b3076c48e083cd54a4 /build.bash
parentf873d5f0a1a76ba00881cf9813dce8421b99a68d (diff)
build.bash: support colon-separated GOPATH variable
Fixes issue #31 https://github.com/rfjakob/gocryptfs/issues/31
Diffstat (limited to 'build.bash')
-rwxr-xr-xbuild.bash9
1 files changed, 6 insertions, 3 deletions
diff --git a/build.bash b/build.bash
index 2ea499c..115a2ae 100755
--- a/build.bash
+++ b/build.bash
@@ -4,12 +4,15 @@ set -eu
cd "$(dirname "$0")"
+# GOPATH may contain multiple paths separated by ":"
+GOPATH2=$(echo $GOPATH | cut -f1 -d:)
+
# gocryptfs version according to git
GITVERSION=$(git describe --tags --dirty)
# go-fuse version according to git
GITVERSIONFUSE=$(
- cd $GOPATH/src/github.com/hanwen/go-fuse
+ cd $GOPATH2/src/github.com/hanwen/go-fuse
SHORT=$(git rev-parse --short HEAD)
# Check if the tree is dirty, adapted from
@@ -37,5 +40,5 @@ fi
./gocryptfs -version
-mkdir -p $GOPATH/bin
-cp -af gocryptfs $GOPATH/bin
+mkdir -p $GOPATH2/bin
+cp -af gocryptfs $GOPATH2/bin