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.

47 lines
1.2 KiB

  1. #!/usr/bin/env bash
  2. # XXX: this script is intended to be run from
  3. # a fresh Digital Ocean droplet with Ubuntu
  4. # upon its completion, you must either reset
  5. # your terminal or run `source ~/.profile`
  6. # as written, this script will install
  7. # tendermint core from master branch
  8. REPO=github.com/tendermint/tendermint
  9. # change this to a specific release or branch
  10. BRANCH=master
  11. sudo apt-get update -y
  12. sudo apt-get install -y make
  13. # get and unpack golang
  14. curl -O https://storage.googleapis.com/golang/go1.11.linux-amd64.tar.gz
  15. tar -xvf go1.11.linux-amd64.tar.gz
  16. # move go folder and add go binary to path
  17. sudo mv go /usr/local
  18. echo "export PATH=\$PATH:/usr/local/go/bin" >> ~/.profile
  19. # create the goApps directory, set GOPATH, and put it on PATH
  20. mkdir goApps
  21. echo "export GOPATH=$HOME/goApps" >> ~/.profile
  22. echo "export PATH=\$PATH:\$GOPATH/bin" >> ~/.profile
  23. source ~/.profile
  24. # get the code and move into repo
  25. go get $REPO
  26. cd "$GOPATH/src/$REPO"
  27. # build & install
  28. git checkout $BRANCH
  29. # XXX: uncomment if branch isn't master
  30. # git fetch origin $BRANCH
  31. make get_tools
  32. make get_vendor_deps
  33. make install
  34. # the binary is located in $GOPATH/bin
  35. # run `source ~/.profile` or reset your terminal
  36. # to persist the changes