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.

55 lines
1.3 KiB

  1. #!/usr/bin/tcsh
  2. # XXX: this script is intended to be run from
  3. # a fresh Digital Ocean droplet with FreeBSD
  4. # Just run tcsh install_tendermint_bsd.sh
  5. # upon its completion, you must either reset
  6. # your terminal or run `source ~/.tcshrc`
  7. # This assumes your installing it through tcsh as root.
  8. # Change the relevant lines from tcsh to csh if your
  9. # installing as a different user, along with changing the
  10. # gopath.
  11. # change this to a specific release or branch
  12. set BRANCH=master
  13. set REPO=github.com/tendermint/tendermint
  14. set GO_VERSION=1.11.2
  15. sudo pkg update
  16. sudo pkg install -y gmake
  17. sudo pkg install -y git
  18. # get and unpack golang
  19. curl -O https://storage.googleapis.com/golang/go$GO_VERSION.freebsd-amd64.tar.gz
  20. tar -xvf go$GO_VERSION.freebsd-amd64.tar.gz
  21. # move go folder and add go binary to path
  22. sudo mv go /usr/local
  23. set path=($path /usr/local/go/bin)
  24. # create the go directory, set GOPATH, and put it on PATH
  25. mkdir go
  26. echo "setenv GOPATH /root/go" >> ~/.tcshrc
  27. setenv GOPATH /root/go
  28. echo "set path=($path $GOPATH/bin)" >> ~/.tcshrc
  29. source ~/.tcshrc
  30. # get the code and move into repo
  31. go get $REPO
  32. cd "$GOPATH/src/$REPO"
  33. # build & install master
  34. git checkout $BRANCH
  35. gmake get_tools
  36. gmake get_vendor_deps
  37. gmake install
  38. # the binary is located in $GOPATH/bin
  39. # run `source ~/.profile` or reset your terminal
  40. # to persist the changes