aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Unterwurzacher2017-02-19 20:14:46 +0100
committerJakob Unterwurzacher2017-02-20 21:26:18 +0100
commit166c62fd2137eb45fb8a5664f79cf8ff8f27d6e4 (patch)
tree85e77cc6b16a32bdb73375ddc2cf63785c2e2cc7
parent1139c27c36de723391b6a5935159feaef49be299 (diff)
build.bash: use $(go env GOPATH)
-rw-r--r--README.md8
-rwxr-xr-xbuild.bash9
2 files changed, 9 insertions, 8 deletions
diff --git a/README.md b/README.md
index 9384d42..7477957 100644
--- a/README.md
+++ b/README.md
@@ -64,7 +64,13 @@ as well as in the go-fuse library.
Compile
-------
- $ go get github.com/rfjakob/gocryptfs
+ $ go get -d github.com/rfjakob/gocryptfs
+ $ cd $(go env GOPATH)/src/github.com/rfjakob/gocryptfs
+ $ ./build.bash
+
+Or, if you don't have OpenSSL installed:
+
+ $ ./build-without-openssl.bash
Use
---
diff --git a/build.bash b/build.bash
index 0dcc272..e492f17 100755
--- a/build.bash
+++ b/build.bash
@@ -4,13 +4,8 @@ set -eu
cd "$(dirname "$0")"
-# 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
+# GOPATH may contain multiple paths separated by ":"
+GOPATH1=$(go env GOPATH | cut -f1 -d:)
# gocryptfs version according to git
GITVERSION=$(git describe --tags --dirty)