From a3640ef8090a908724c44e19f6a0ef2b254fb096 Mon Sep 17 00:00:00 2001 From: Jack Zampolin Date: Wed, 11 Jul 2018 03:47:59 -0700 Subject: [PATCH] Add OSX install script (#1947) * Add OSX install script * Address PR comments --- scripts/install/install_tendermint_osx.sh | 41 +++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 scripts/install/install_tendermint_osx.sh diff --git a/scripts/install/install_tendermint_osx.sh b/scripts/install/install_tendermint_osx.sh new file mode 100644 index 000000000..b4107ab01 --- /dev/null +++ b/scripts/install/install_tendermint_osx.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash + +# XXX: this script is intended to be run from +# an MacOS machine + +# as written, this script will install +# tendermint core from master branch +REPO=github.com/tendermint/tendermint + +# change this to a specific release or branch +BRANCH=master + +if ! [ -x "$(command -v brew)" ]; then + echo 'Error: brew is not installed, to install brew' >&2 + echo 'follow the instructions here: https://docs.brew.sh/Installation' >&2 + exit 1 +fi + +if ! [ -x "$(command -v go)" ]; then + echo 'Error: go is not installed, to install go follow' >&2 + echo 'the instructions here: https://golang.org/doc/install#tarball' >&2 + echo 'ALSO MAKE SURE TO SETUP YOUR $GOPATH and $GOBIN in your ~/.profile: https://github.com/golang/go/wiki/SettingGOPATH' >&2 + exit 1 +fi + +if ! [ -x "$(command -v make)" ]; then + echo 'Make not installed, installing using brew...' + brew install make +fi + +# get the code and move into repo +go get $REPO +cd $GOPATH/src/$REPO + +# build & install +git checkout $BRANCH +# XXX: uncomment if branch isn't master +# git fetch origin $BRANCH +make get_tools +make get_vendor_deps +make install