github.com/evdatsion/aphelion-dpos-bft@v0.32.1/scripts/install/install_tendermint_bsd.sh (about)

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