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.

53 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. sudo pkg update
  14. sudo pkg install -y gmake
  15. sudo pkg install -y git
  16. # get and unpack golang
  17. curl -O https://storage.googleapis.com/golang/go1.11.freebsd-amd64.tar.gz
  18. tar -xvf go1.11.freebsd-amd64.tar.gz
  19. # move go folder and add go binary to path
  20. sudo mv go /usr/local
  21. set path=($path /usr/local/go/bin)
  22. # create the go directory, set GOPATH, and put it on PATH
  23. mkdir go
  24. echo "setenv GOPATH /root/go" >> ~/.tcshrc
  25. setenv GOPATH /root/go
  26. echo "set path=($path $GOPATH/bin)" >> ~/.tcshrc
  27. source ~/.tcshrc
  28. # get the code and move into repo
  29. set REPO=github.com/tendermint/tendermint
  30. go get $REPO
  31. cd "$GOPATH/src/$REPO"
  32. # build & install master
  33. git checkout $BRANCH
  34. gmake get_tools
  35. gmake get_vendor_deps
  36. gmake install
  37. # the binary is located in $GOPATH/bin
  38. # run `source ~/.profile` or reset your terminal
  39. # to persist the changes