From 40df73adc2eab233149f68a5241a8a879139bbd7 Mon Sep 17 00:00:00 2001 From: ValarDragon Date: Mon, 4 Jun 2018 13:35:00 -0700 Subject: [PATCH] docs: Add BSD install script --- docs/guides/sdk/install.md | 2 +- scripts/install_sdk_bsd.sh | 46 +++++++++++++++++++ scripts/{install.sh => install_sdk_ubuntu.sh} | 0 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 scripts/install_sdk_bsd.sh rename scripts/{install.sh => install_sdk_ubuntu.sh} (100%) diff --git a/docs/guides/sdk/install.md b/docs/guides/sdk/install.md index cf3e831610..37faec8293 100644 --- a/docs/guides/sdk/install.md +++ b/docs/guides/sdk/install.md @@ -1,7 +1,7 @@ # Install The fastest and easiest way to install the Cosmos SDK binaries -is to run [this script](https://github.com/cosmos/cosmos-sdk/blob/develop/scripts/install.sh) on a fresh Ubuntu instance. Read the comments / instructions carefully (i.e., reset your terminal after running the script). +is to run [this script](https://github.com/cosmos/cosmos-sdk/blob/develop/scripts/install_sdk_ubuntu.sh) on a fresh Ubuntu instance. Similarly, you can run [this script](https://github.com/cosmos/cosmos-sdk/blob/develop/scripts/install_sdk_bsd.sh) on a fresh FreeBSD instance. Read the comments / instructions carefully (i.e., reset your terminal after running the script). Cosmos SDK can be installed to `$GOPATH/src/github.com/cosmos/cosmos-sdk` like a normal Go program: diff --git a/scripts/install_sdk_bsd.sh b/scripts/install_sdk_bsd.sh new file mode 100644 index 0000000000..e0795ca907 --- /dev/null +++ b/scripts/install_sdk_bsd.sh @@ -0,0 +1,46 @@ +#!/usr/bin/tcsh + +# Just run tcsh install_sdk_bsd.sh +# XXX: this script is intended to be run from +# a fresh Digital Ocean droplet with FreeBSD + +# upon its completion, you must either reset +# your terminal or run `source ~/.tcshrc` + +# change this to a specific release or branch +set BRANCH=master + +sudo pkg updatels + +sudo pkg upgrade -y +sudo pkg install -y gmake +sudo pkg install -y git + +# get and unpack golang +curl -O https://storage.googleapis.com/golang/go1.10.freebsd-amd64.tar.gz +tar -xvf go1.10.freebsd-amd64.tar.gz + +# move go binary and add to path +mv go /usr/local +set path=($path /usr/local/go/bin) + + +# create the go directory, set GOPATH, and put it on PATH +mkdir go +echo "setenv GOPATH /root/go" >> ~/.tcshrc +setenv GOPATH /root/go +echo "set path=($path $GOPATH/bin)" >> ~/.tcshrc + +source ~/.tcshrc + +# get the code and move into repo +set REPO=github.com/cosmos/cosmos-sdk +go get $REPO +cd $GOPATH/src/$REPO + +# build & install master +git checkout $BRANCH +gmake get_tools +gmake get_vendor_deps +gmake install +gmake install_examples diff --git a/scripts/install.sh b/scripts/install_sdk_ubuntu.sh similarity index 100% rename from scripts/install.sh rename to scripts/install_sdk_ubuntu.sh