github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/libs/cosmos-sdk/scripts/install/install_sdk_ubuntu.sh (about)

     1  #!/usr/bin/env bash
     2  
     3  # XXX: this script is intended to be run from
     4  # a fresh Digital Ocean droplet with Ubuntu
     5  
     6  # change this to a specific release or branch
     7  BRANCH=master
     8  REPO=github.com/cosmos/cosmos-sdk
     9  
    10  GO_VERSION=1.12.5
    11  
    12  sudo apt-get update -y
    13  sudo apt-get upgrade -y
    14  sudo apt-get install -y make
    15  
    16  # get and unpack golang
    17  curl -O https://dl.google.com/go/go$GO_VERSION.linux-amd64.tar.gz
    18  tar -xvf go$GO_VERSION.linux-amd64.tar.gz
    19  
    20  # move go binary and add to path
    21  mv go /usr/local
    22  echo "export PATH=\$PATH:/usr/local/go/bin" >> ~/.profile
    23  
    24  # create the go directory, set GOPATH, and put it on PATH
    25  mkdir go
    26  echo "export GOPATH=$HOME/go" >> ~/.profile
    27  echo "export PATH=\$PATH:\$GOPATH/bin" >> ~/.profile
    28  echo "export GO111MODULE=on" >> ~/.profile
    29  source ~/.profile
    30  
    31  # get the code and move into repo
    32  go get $REPO
    33  cd $GOPATH/src/$REPO
    34  
    35  # build & install master
    36  git checkout $BRANCH
    37  LEDGER_ENABLED=false make tools
    38  LEDGER_ENABLED=false make install
    39  
    40  source ~/.profile