From 073e996cc25034c3201ad86ef26a573034ede4bd Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Mon, 27 Jul 2020 11:47:46 +0100 Subject: [PATCH] docs: update install from source instructions This has changed post Go modules. In particular it recommends against the go get `-u` flag. See: https://forum.rclone.org/t/install-from-source-go-get-errors/18114 --- docs/content/install.md | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/docs/content/install.md b/docs/content/install.md index 3803f0fbc..92ffb9420 100644 --- a/docs/content/install.md +++ b/docs/content/install.md @@ -183,16 +183,23 @@ latest release is recommended. Then go build ./rclone version -You can also build and install rclone in the -[GOPATH](https://github.com/golang/go/wiki/GOPATH) (which defaults to -`~/go`) with: +This will leave you a checked out version of rclone you can modify and +send pull requests with. If you use `make` instead of `go build` then +the rclone build will have the correct version information in it. - go get -u -v github.com/rclone/rclone +You can also build the latest stable rclone with: -and this will build the binary in `$GOPATH/bin` (`~/go/bin/rclone` by -default) after downloading the source to -`$GOPATH/src/github.com/rclone/rclone` (`~/go/src/github.com/rclone/rclone` -by default). + go get github.com/rclone/rclone + +or the latest version (equivalent to the beta) with + + go get github.com/rclone/rclone@master + +These will build the binary in `$(go env GOPATH)/bin` +(`~/go/bin/rclone` by default) after downloading the source to the go +module cache. Note - do **not** use the `-u` flag here. This causes go +to try to update the depencencies that rclone uses and sometimes these +don't work with the current version of rclone. ## Installation with Ansible ##