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.

54 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 upgrade -y
  15. sudo pkg install -y gmake
  16. sudo pkg install -y git
  17. # get and unpack golang
  18. curl -O https://storage.googleapis.com/golang/go1.10.freebsd-amd64.tar.gz
  19. tar -xvf go1.10.freebsd-amd64.tar.gz
  20. # move go binary and add to path
  21. mv go /usr/local
  22. set path=($path /usr/local/go/bin)
  23. # create the go directory, set GOPATH, and put it on PATH
  24. mkdir go
  25. echo "setenv GOPATH /root/go" >> ~/.tcshrc
  26. setenv GOPATH /root/go
  27. echo "set path=($path $GOPATH/bin)" >> ~/.tcshrc
  28. source ~/.tcshrc
  29. # get the code and move into repo
  30. set REPO=github.com/tendermint/tendermint
  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