You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
936 B

  1. #!/usr/bin/env bash
  2. REPO=github.com/tendermint/tendermint
  3. # change this to a specific release or branch
  4. BRANCH=master
  5. GO_VERSION=1.12
  6. sudo apt-get update -y
  7. # get and unpack golang
  8. curl -O https://storage.googleapis.com/golang/go$GO_VERSION.linux-armv6l.tar.gz
  9. tar -xvf go$GO_VERSION.linux-armv6l.tar.gz
  10. # move go folder and add go binary to path
  11. sudo mv go /usr/local
  12. echo "export PATH=\$PATH:/usr/local/go/bin" >> ~/.profile
  13. # create the go directory, set GOPATH, and put it on PATH
  14. mkdir go
  15. echo "export GOPATH=$HOME/go" >> ~/.profile
  16. echo "export PATH=\$PATH:\$GOPATH/bin" >> ~/.profile
  17. source ~/.profile
  18. # get the code and move into repo
  19. go get $REPO
  20. cd "$GOPATH/src/$REPO"
  21. # build & install
  22. git checkout $BRANCH
  23. # XXX: uncomment if branch isn't master
  24. # git fetch origin $BRANCH
  25. make get_tools
  26. make install
  27. # the binary is located in $GOPATH/bin
  28. # run `source ~/.profile` or reset your terminal
  29. # to persist the changes