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.

41 lines
1.1 KiB

  1. #!/usr/bin/env bash
  2. # XXX: this script is intended to be run from
  3. # an MacOS machine
  4. # as written, this script will install
  5. # tendermint core from master branch
  6. REPO=github.com/tendermint/tendermint
  7. # change this to a specific release or branch
  8. BRANCH=master
  9. if ! [ -x "$(command -v brew)" ]; then
  10. echo 'Error: brew is not installed, to install brew' >&2
  11. echo 'follow the instructions here: https://docs.brew.sh/Installation' >&2
  12. exit 1
  13. fi
  14. if ! [ -x "$(command -v go)" ]; then
  15. echo 'Error: go is not installed, to install go follow' >&2
  16. echo 'the instructions here: https://golang.org/doc/install#tarball' >&2
  17. echo 'ALSO MAKE SURE TO SETUP YOUR $GOPATH and $GOBIN in your ~/.profile: https://github.com/golang/go/wiki/SettingGOPATH' >&2
  18. exit 1
  19. fi
  20. if ! [ -x "$(command -v make)" ]; then
  21. echo 'Make not installed, installing using brew...'
  22. brew install make
  23. fi
  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