From ee8ad9ae8cdc2cb223a13b9beb4ee810d3bbc54a Mon Sep 17 00:00:00 2001 From: benracicot Date: Mon, 1 Feb 2021 15:00:27 -0500 Subject: [PATCH 1/9] glide install cmd added --- README.md | 9 ++++- scripts/install-macos.sh | 86 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+), 2 deletions(-) create mode 100755 scripts/install-macos.sh diff --git a/README.md b/README.md index 1b701f8d7..7939a2d55 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,9 @@ To run the bot in simulation mode, try this command: _Note for Windows Users: You should use a [Bash Shell][bash] to follow the steps below. This will give you a UNIX environment in which to run your commands and will enable the `./scripts/build.sh` bash script to work correctly._ -To compile Kelp from source: +_Note for MacOS Users: Running [install-macos.sh][install-macos-script] should automate steps 1-9 below. However, manual installation of PostgreSQL and Docker are additionally required._ + +## Manual Installation Steps 1. [Download][golang-download] and [setup][golang-setup] Golang _v1.13 or later_. * Confirm that `$GOPATH` is set, and that `GOBIN=$GOPATH/bin` @@ -119,7 +121,9 @@ To compile Kelp from source: * `./scripts/build.sh` 8. Confirm one new binary file exists with version information. * `./bin/kelp version` -9. Set up CCXT to use an expanded set of priceFeeds and orderbooks (see the [Using CCXT](#using-ccxt) section for details) +9. Run the GUI + * `./bin/kelp server` +10. Set up CCXT to use an expanded set of priceFeeds and orderbooks (see the [Using CCXT](#using-ccxt) section for details) * `sudo docker run -p 3000:3000 -d franzsee/ccxt-rest:v0.0.4` ## Running Kelp @@ -404,3 +408,4 @@ See the [Code of Conduct](CODE_OF_CONDUCT.md). [github-bug-report]: https://github.com/stellar/kelp/issues/new?template=bug_report.md [github-feature-request]: https://github.com/stellar/kelp/issues/new?template=feature_request.md [github-new-issue]: https://github.com/stellar/kelp/issues/new +[install-macos-script]:https://github.com/stellar/kelp/blob/master/scripts/install-macos.sh \ No newline at end of file diff --git a/scripts/install-macos.sh b/scripts/install-macos.sh new file mode 100755 index 000000000..cc2919857 --- /dev/null +++ b/scripts/install-macos.sh @@ -0,0 +1,86 @@ +#!/bin/sh + +function isNode() { + clear + if node -v; then + echo "Node is installed" + isYarn + else + echo "Node is not installed." + fi +} + +function isYarn() { + if yarn --version; then + echo "Yarn is installed" + isGo + else + echo "Yarn is not installed." + fi +} + +function isGo() { + if go version; then + echo "Golang is installed" + echo "GOPATH is currently $GOPATH" + else + echo "Golang is not installed. Calling install script from git.io/vQhTU" + if curl; then + # macOS typically has curl installed + curl -L https://raw.githubusercontent.com/canha/golang-tools-install-script/master/goinstall.sh | bash + elif wget; then + # Linux typically has wget installed + wget -q -O - https://raw.githubusercontent.com/canha/golang-tools-install-script/master/goinstall.sh | bash + else + echo "curl and wget are not available, install Golang manually youtube.com/watch?v=MbS1wn0B-fk" + fi + fi + isGlide +} + +function isGlide() { + if glide --version; then + echo "Glide is installed" + else + echo "Installing Glide." + if curl; then + curl https://glide.sh/get | sh + elif wget; then + wget https://glide.sh/get | sh + else + echo "curl and wget are not available, install glide manually https://github.com/Masterminds/glide" + fi + fi + glide install + isAstilectron +} + +function isAstilectron() { + go get -u github.com/asticode/go-astilectron-bundler/... + go install github.com/asticode/go-astilectron-bundler/astilectron-bundler + + cloneAndBuild +} + +function cloneAndBuild() { + # setup Kelp directories in the correct location + mkdir $GOPATH/src/github.com/stellar/kelp/ + + git clone https://github.com/stellar/kelp.git $GOPATH/src/github.com/stellar/kelp + + cd $GOPATH/src/github.com/stellar/kelp + + # Build the binaries using the provided build script (the go install command will produce a faulty binary): + ./scripts/build.sh + + # Confirm one new binary file exists with version information. + ./bin/kelp version + + # run the GUI + ./bin/kelp server +} + +isNode + +echo "Remember, PostgreSQL must be running to store data." +echo "Remember, Docker and CCXT must be configured for the expanded set of priceFeeds and orderbooks." From 3c9e49dbe7b69b1b19626ac3e545a82785db13ac Mon Sep 17 00:00:00 2001 From: benracicot Date: Mon, 1 Feb 2021 15:21:15 -0500 Subject: [PATCH 2/9] curl and wget checks working --- scripts/install-macos.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/install-macos.sh b/scripts/install-macos.sh index cc2919857..d59d25a92 100755 --- a/scripts/install-macos.sh +++ b/scripts/install-macos.sh @@ -25,10 +25,10 @@ function isGo() { echo "GOPATH is currently $GOPATH" else echo "Golang is not installed. Calling install script from git.io/vQhTU" - if curl; then + if curl --version; then # macOS typically has curl installed curl -L https://raw.githubusercontent.com/canha/golang-tools-install-script/master/goinstall.sh | bash - elif wget; then + elif wget --version; then # Linux typically has wget installed wget -q -O - https://raw.githubusercontent.com/canha/golang-tools-install-script/master/goinstall.sh | bash else @@ -43,9 +43,9 @@ function isGlide() { echo "Glide is installed" else echo "Installing Glide." - if curl; then + if curl --version; then curl https://glide.sh/get | sh - elif wget; then + elif wget --version; then wget https://glide.sh/get | sh else echo "curl and wget are not available, install glide manually https://github.com/Masterminds/glide" From a3939574e9044fffc4cfe90a84c3320e12baeb61 Mon Sep 17 00:00:00 2001 From: benracicot Date: Mon, 1 Feb 2021 16:03:50 -0500 Subject: [PATCH 3/9] rearrange install process to install Glide in the Go directory --- README.md | 2 +- scripts/install-macos.sh | 41 ++++++++++++++++++++++++++++------------ 2 files changed, 30 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 7939a2d55..ee0ff1827 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ To run the bot in simulation mode, try this command: _Note for Windows Users: You should use a [Bash Shell][bash] to follow the steps below. This will give you a UNIX environment in which to run your commands and will enable the `./scripts/build.sh` bash script to work correctly._ -_Note for MacOS Users: Running [install-macos.sh][install-macos-script] should automate steps 1-9 below. However, manual installation of PostgreSQL and Docker are additionally required._ +_Note for MacOS Users: Running [install-macos.sh][install-macos-script] should automate the steps below. (including cloning the Kelp repo to the correct Go folder) Remember, manual installation of PostgreSQL and Docker are additionally required._ ## Manual Installation Steps diff --git a/scripts/install-macos.sh b/scripts/install-macos.sh index d59d25a92..a18978fc6 100755 --- a/scripts/install-macos.sh +++ b/scripts/install-macos.sh @@ -35,9 +35,27 @@ function isGo() { echo "curl and wget are not available, install Golang manually youtube.com/watch?v=MbS1wn0B-fk" fi fi + isGlide } +# Once we have Go working finish the install processes inside the development directory to avoid errors (Glide) +function cloneAndBuild() { + if go version; then + # setup Kelp directory in the correct Golang working directory + mkdir $GOPATH/src/github.com/stellar/kelp/ + + git clone https://github.com/stellar/kelp.git $GOPATH/src/github.com/stellar/kelp + + cd $GOPATH/src/github.com/stellar/kelp + + isGlide + else + echo "Golang not installed, try again." + exit + fi +} + function isGlide() { if glide --version; then echo "Glide is installed" @@ -49,27 +67,26 @@ function isGlide() { wget https://glide.sh/get | sh else echo "curl and wget are not available, install glide manually https://github.com/Masterminds/glide" + exit fi fi - glide install + isAstilectron } function isAstilectron() { - go get -u github.com/asticode/go-astilectron-bundler/... - go install github.com/asticode/go-astilectron-bundler/astilectron-bundler + if go version; then + go get -u github.com/asticode/go-astilectron-bundler/... + go install github.com/asticode/go-astilectron-bundler/astilectron-bundler + else + echo "Golang cannot install Astilectron" + exit + fi - cloneAndBuild + buildAndRun } -function cloneAndBuild() { - # setup Kelp directories in the correct location - mkdir $GOPATH/src/github.com/stellar/kelp/ - - git clone https://github.com/stellar/kelp.git $GOPATH/src/github.com/stellar/kelp - - cd $GOPATH/src/github.com/stellar/kelp - +function buildAndRun() { # Build the binaries using the provided build script (the go install command will produce a faulty binary): ./scripts/build.sh From 50a4fc6a0c071d21515dd4a1781137bb4fee2b15 Mon Sep 17 00:00:00 2001 From: benracicot Date: Wed, 3 Feb 2021 20:08:07 -0500 Subject: [PATCH 4/9] goinstaller.sh --- scripts/goinstaller-macos.sh | 157 +++++++++++++++++++++++++++++++++++ scripts/install-macos.sh | 32 ++++--- 2 files changed, 172 insertions(+), 17 deletions(-) create mode 100644 scripts/goinstaller-macos.sh diff --git a/scripts/goinstaller-macos.sh b/scripts/goinstaller-macos.sh new file mode 100644 index 000000000..fd55a2d4a --- /dev/null +++ b/scripts/goinstaller-macos.sh @@ -0,0 +1,157 @@ +#!/bin/bash +# shellcheck disable=SC2016 +set -e + +VERSION="1.15.7" + +[ -z "$GOROOT" ] && GOROOT="/usr/local/go" +[ -z "$GOPATH" ] && GOPATH="$HOME/go" + +OS="$(uname -s)" +ARCH="$(uname -m)" + +case $OS in + "Linux") + case $ARCH in + "x86_64") + ARCH=amd64\ + ;; + "aarch64") + ARCH=arm64 + ;; + "armv6" | "armv7l") + ARCH=armv6l + ;; + "armv8") + ARCH=arm64 + ;; + .*386.*) + ARCH=386 + ;; + esac + PLATFORM="linux-$ARCH" + ;; + "Darwin") + PLATFORM="darwin-amd64" + ;; +esac + +print_help() { + echo "Usage: bash goinstall.sh OPTIONS" + echo -e "\nOPTIONS:" + echo -e " --remove\tRemove currently installed version" + echo -e " --version\tSpecify a version number to install" +} + +if [ -z "$PLATFORM" ]; then + echo "Your operating system is not supported by the script." + exit 1 +fi + +if [ -n "$($SHELL -c 'echo $ZSH_VERSION')" ]; then + shell_profile="$HOME/.zshrc" +elif [ -n "$($SHELL -c 'echo $BASH_VERSION')" ]; then + shell_profile="$HOME/.bashrc" +elif [ -n "$($SHELL -c 'echo $FISH_VERSION')" ]; then + shell="fish" + if [ -d "$XDG_CONFIG_HOME" ]; then + shell_profile="$XDG_CONFIG_HOME/fish/config.fish" + else + shell_profile="$HOME/.config/fish/config.fish" + fi +fi + +if [ "$1" == "--remove" ]; then + rm -rf "$GOROOT" + if [ "$OS" == "Darwin" ]; then + if [ "$shell" == "fish" ]; then + sed -i "" '/# GoLang/d' "$shell_profile" + sed -i "" '/set GOROOT/d' "$shell_profile" + sed -i "" '/set GOPATH/d' "$shell_profile" + sed -i "" '/set PATH $GOPATH\/bin $GOROOT\/bin $PATH/d' "$shell_profile" + else + sed -i "" '/# GoLang/d' "$shell_profile" + sed -i "" '/export GOROOT/d' "$shell_profile" + sed -i "" '/$GOROOT\/bin/d' "$shell_profile" + sed -i "" '/export GOPATH/d' "$shell_profile" + sed -i "" '/$GOPATH\/bin/d' "$shell_profile" + fi + else + if [ "$shell" == "fish" ]; then + sed -i '/# GoLang/d' "$shell_profile" + sed -i '/set GOROOT/d' "$shell_profile" + sed -i '/set GOPATH/d' "$shell_profile" + sed -i '/set PATH $GOPATH\/bin $GOROOT\/bin $PATH/d' "$shell_profile" + else + sed -i '/# GoLang/d' "$shell_profile" + sed -i '/export GOROOT/d' "$shell_profile" + sed -i '/$GOROOT\/bin/d' "$shell_profile" + sed -i '/export GOPATH/d' "$shell_profile" + sed -i '/$GOPATH\/bin/d' "$shell_profile" + fi + fi + echo "Go removed." + exit 0 +elif [ "$1" == "--help" ]; then + print_help + exit 0 +elif [ "$1" == "--version" ]; then + if [ -z "$2" ]; then # Check if --version has a second positional parameter + echo "Please provide a version number for: $1" + else + VERSION=$2 + fi +elif [ ! -z "$1" ]; then + echo "Unrecognized option: $1" + exit 1 +fi + +if [ -d "$GOROOT" ]; then + echo "The Go install directory ($GOROOT) already exists. Exiting." + exit 1 +fi + +PACKAGE_NAME="go$VERSION.$PLATFORM.tar.gz" +TEMP_DIRECTORY=$(mktemp -d) + +echo "Downloading $PACKAGE_NAME ..." +if hash wget 2>/dev/null; then + wget https://storage.googleapis.com/golang/$PACKAGE_NAME -O "$TEMP_DIRECTORY/go.tar.gz" +else + curl -o "$TEMP_DIRECTORY/go.tar.gz" https://storage.googleapis.com/golang/$PACKAGE_NAME +fi + +if [ $? -ne 0 ]; then + echo "Download failed! Exiting." + exit 1 +fi + +echo "Extracting File..." +mkdir -p "$GOROOT" + +tar -C "$GOROOT" --strip-components=1 -xzf "$TEMP_DIRECTORY/go.tar.gz" + +echo "Configuring shell profile in: $shell_profile" +touch "$shell_profile" +if [ "$shell" == "fish" ]; then + { + echo '# GoLang' + echo "set GOROOT '${GOROOT}'" + echo "set GOPATH '$GOPATH'" + echo 'set PATH $GOPATH/bin $GOROOT/bin $PATH' + } >> "$shell_profile" +else + { + echo '# GoLang' + echo "export GOROOT=${GOROOT}" + echo 'export PATH=$GOROOT/bin:$PATH' + echo "export GOPATH=$GOPATH" + echo 'export PATH=$GOPATH/bin:$PATH' + } >> "$shell_profile" +fi + +mkdir -p "${GOPATH}/"{src,pkg,bin} +echo -e "\nGo $VERSION was installed into $GOROOT.\nMake sure to relogin into your shell or run:" +echo -e "\n\tsource $shell_profile\n\nto update your environment variables." +echo "Tip: Opening a new terminal window usually just works. :)" +rm -f "$TEMP_DIRECTORY/go.tar.gz" \ No newline at end of file diff --git a/scripts/install-macos.sh b/scripts/install-macos.sh index a18978fc6..65a6151f9 100755 --- a/scripts/install-macos.sh +++ b/scripts/install-macos.sh @@ -24,27 +24,21 @@ function isGo() { echo "Golang is installed" echo "GOPATH is currently $GOPATH" else - echo "Golang is not installed. Calling install script from git.io/vQhTU" - if curl --version; then - # macOS typically has curl installed - curl -L https://raw.githubusercontent.com/canha/golang-tools-install-script/master/goinstall.sh | bash - elif wget --version; then - # Linux typically has wget installed - wget -q -O - https://raw.githubusercontent.com/canha/golang-tools-install-script/master/goinstall.sh | bash - else - echo "curl and wget are not available, install Golang manually youtube.com/watch?v=MbS1wn0B-fk" - fi + echo "Golang is not installed. Calling goinstaller-macos.sh" + chmod +x ./goinstaller-macos.sh + ./goinstaller-macos.sh fi - isGlide + cloneIntoDir } # Once we have Go working finish the install processes inside the development directory to avoid errors (Glide) -function cloneAndBuild() { +function cloneIntoDir() { if go version; then - # setup Kelp directory in the correct Golang working directory + echo "Setting up Kelp folders in the Golang working directory" mkdir $GOPATH/src/github.com/stellar/kelp/ + echo "Cloning Kelp into $GOPATH/src/github.com/stellar/kelp" git clone https://github.com/stellar/kelp.git $GOPATH/src/github.com/stellar/kelp cd $GOPATH/src/github.com/stellar/kelp @@ -87,13 +81,17 @@ function isAstilectron() { } function buildAndRun() { - # Build the binaries using the provided build script (the go install command will produce a faulty binary): + echo "Building Kelp binaries" ./scripts/build.sh - # Confirm one new binary file exists with version information. - ./bin/kelp version + echo "Confirming the Kelp binary exists with version information." + if ./bin/kelp version; then + echo "Kelp has built successfully" + else + echo "The Kelp build was not successful" + fi - # run the GUI + echo "run the GUI" ./bin/kelp server } From 9071a2feaed039e65d98333641270e76007af1b3 Mon Sep 17 00:00:00 2001 From: Ben Racicot <1815385+BenRacicot@users.noreply.github.com> Date: Thu, 4 Feb 2021 22:00:22 -0500 Subject: [PATCH 5/9] Update install-macos.sh direct commit --- scripts/install-macos.sh | 136 +++++++++++++++++++++++++++++++++++---- 1 file changed, 122 insertions(+), 14 deletions(-) diff --git a/scripts/install-macos.sh b/scripts/install-macos.sh index 65a6151f9..ad92b1676 100755 --- a/scripts/install-macos.sh +++ b/scripts/install-macos.sh @@ -1,4 +1,6 @@ #!/bin/sh +# shellcheck disable=SC2016 +set -e function isNode() { clear @@ -21,12 +23,114 @@ function isYarn() { function isGo() { if go version; then - echo "Golang is installed" - echo "GOPATH is currently $GOPATH" + echo "Golang is installed at $GOPATH" else - echo "Golang is not installed. Calling goinstaller-macos.sh" - chmod +x ./goinstaller-macos.sh - ./goinstaller-macos.sh + echo "Golang is not installed. Starting Golang install..." + + VERSION="1.15.7" + + [ -z "$GOROOT" ] && GOROOT="/usr/local/go" + [ -z "$GOPATH" ] && GOPATH="$HOME/go" + + OS="$(uname -s)" + ARCH="$(uname -m)" + + case $OS in + "Linux") + case $ARCH in + "x86_64") + ARCH=amd64\ + ;; + "aarch64") + ARCH=arm64 + ;; + "armv6" | "armv7l") + ARCH=armv6l + ;; + "armv8") + ARCH=arm64 + ;; + .*386.*) + ARCH=386 + ;; + esac + PLATFORM="linux-$ARCH" + ;; + "Darwin") + PLATFORM="darwin-amd64" + ;; + esac + + if [ -z "$PLATFORM" ]; then + echo "Your operating system is not supported by the script." + exit 1 + fi + + if $ZSH_VERSION; then + shell_profile="$HOME/.zshrc" + elif $BASH_VERSION; then + shell_profile="$HOME/.bashrc" + elif $FISH_VERSION; then + shell="fish" + if [ -d "$XDG_CONFIG_HOME" ]; then + shell_profile="$XDG_CONFIG_HOME/fish/config.fish" + else + shell_profile="$HOME/.config/fish/config.fish" + fi + fi + + echo "shell_profile set to $shell_profile" + + if [ -d "$GOROOT" ]; then + echo "The Go install directory ($GOROOT) already exists. Exiting." + exit 1 + fi + + PACKAGE_NAME="go$VERSION.$PLATFORM.tar.gz" + TEMP_DIRECTORY=$(mktemp -d) + + echo "Downloading $PACKAGE_NAME ..." + if hash wget 2>/dev/null; then + wget https://storage.googleapis.com/golang/$PACKAGE_NAME -O "$TEMP_DIRECTORY/go.tar.gz" + else + curl -o "$TEMP_DIRECTORY/go.tar.gz" https://storage.googleapis.com/golang/$PACKAGE_NAME + fi + + if [ $? -ne 0 ]; then + echo "Download failed! Exiting." + exit 1 + fi + + echo "Extracting File..." + mkdir -p "$GOROOT" + + tar -C "$GOROOT" --strip-components=1 -xzf "$TEMP_DIRECTORY/go.tar.gz" + + echo "Configuring shell profile in: $shell_profile" + touch "$shell_profile" + if [ "$shell" == "fish" ]; then + { + echo '# GoLang' + echo "set GOROOT '${GOROOT}'" + echo "set GOPATH '$GOPATH'" + echo 'set PATH $GOPATH/bin $GOROOT/bin $PATH' + } >> "$shell_profile" + else + { + echo '# GoLang' + echo "export GOROOT=${GOROOT}" + echo 'export PATH=$GOROOT/bin:$PATH' + echo "export GOPATH=$GOPATH" + echo 'export PATH=$GOPATH:$PATH' + } >> "$shell_profile" + fi + + mkdir -p "${GOPATH}/"{src,pkg,bin} + echo -e "\nGo $VERSION was installed into $GOROOT.\nMake sure to relogin into your shell or run:" + echo -e "\n\tsource $shell_profile\n\nto update your environment variables." + echo "Tip: Opening a new terminal window usually just works. :)" + rm -f "$TEMP_DIRECTORY/go.tar.gz" + exit fi cloneIntoDir @@ -36,7 +140,11 @@ function isGo() { function cloneIntoDir() { if go version; then echo "Setting up Kelp folders in the Golang working directory" - mkdir $GOPATH/src/github.com/stellar/kelp/ + echo $GOPATH + cd $GOPATH + + # pwd + sudo mkdir github.com/stellar/kelp echo "Cloning Kelp into $GOPATH/src/github.com/stellar/kelp" git clone https://github.com/stellar/kelp.git $GOPATH/src/github.com/stellar/kelp @@ -51,16 +159,16 @@ function cloneIntoDir() { } function isGlide() { - if glide --version; then + if glide --version; then echo "Glide is installed" else echo "Installing Glide." if curl --version; then - curl https://glide.sh/get | sh + curl https://glide.sh/get | sh elif wget --version; then - wget https://glide.sh/get | sh + wget https://glide.sh/get | sh else - echo "curl and wget are not available, install glide manually https://github.com/Masterminds/glide" + echo "curl and wget are not available, install glide manually https://github.com/Masterminds/glide" exit fi fi @@ -81,8 +189,8 @@ function isAstilectron() { } function buildAndRun() { - echo "Building Kelp binaries" - ./scripts/build.sh + echo "Building Kelp binaries" + ./scripts/build.sh echo "Confirming the Kelp binary exists with version information." if ./bin/kelp version; then @@ -91,8 +199,8 @@ function buildAndRun() { echo "The Kelp build was not successful" fi - echo "run the GUI" - ./bin/kelp server + echo "run the GUI" + ./bin/kelp server } isNode From d8027365ca25a64d747097802ac291ec7f77ea2b Mon Sep 17 00:00:00 2001 From: Ben Racicot <1815385+BenRacicot@users.noreply.github.com> Date: Thu, 4 Feb 2021 22:00:47 -0500 Subject: [PATCH 6/9] Delete goinstaller-macos.sh --- scripts/goinstaller-macos.sh | 157 ----------------------------------- 1 file changed, 157 deletions(-) delete mode 100644 scripts/goinstaller-macos.sh diff --git a/scripts/goinstaller-macos.sh b/scripts/goinstaller-macos.sh deleted file mode 100644 index fd55a2d4a..000000000 --- a/scripts/goinstaller-macos.sh +++ /dev/null @@ -1,157 +0,0 @@ -#!/bin/bash -# shellcheck disable=SC2016 -set -e - -VERSION="1.15.7" - -[ -z "$GOROOT" ] && GOROOT="/usr/local/go" -[ -z "$GOPATH" ] && GOPATH="$HOME/go" - -OS="$(uname -s)" -ARCH="$(uname -m)" - -case $OS in - "Linux") - case $ARCH in - "x86_64") - ARCH=amd64\ - ;; - "aarch64") - ARCH=arm64 - ;; - "armv6" | "armv7l") - ARCH=armv6l - ;; - "armv8") - ARCH=arm64 - ;; - .*386.*) - ARCH=386 - ;; - esac - PLATFORM="linux-$ARCH" - ;; - "Darwin") - PLATFORM="darwin-amd64" - ;; -esac - -print_help() { - echo "Usage: bash goinstall.sh OPTIONS" - echo -e "\nOPTIONS:" - echo -e " --remove\tRemove currently installed version" - echo -e " --version\tSpecify a version number to install" -} - -if [ -z "$PLATFORM" ]; then - echo "Your operating system is not supported by the script." - exit 1 -fi - -if [ -n "$($SHELL -c 'echo $ZSH_VERSION')" ]; then - shell_profile="$HOME/.zshrc" -elif [ -n "$($SHELL -c 'echo $BASH_VERSION')" ]; then - shell_profile="$HOME/.bashrc" -elif [ -n "$($SHELL -c 'echo $FISH_VERSION')" ]; then - shell="fish" - if [ -d "$XDG_CONFIG_HOME" ]; then - shell_profile="$XDG_CONFIG_HOME/fish/config.fish" - else - shell_profile="$HOME/.config/fish/config.fish" - fi -fi - -if [ "$1" == "--remove" ]; then - rm -rf "$GOROOT" - if [ "$OS" == "Darwin" ]; then - if [ "$shell" == "fish" ]; then - sed -i "" '/# GoLang/d' "$shell_profile" - sed -i "" '/set GOROOT/d' "$shell_profile" - sed -i "" '/set GOPATH/d' "$shell_profile" - sed -i "" '/set PATH $GOPATH\/bin $GOROOT\/bin $PATH/d' "$shell_profile" - else - sed -i "" '/# GoLang/d' "$shell_profile" - sed -i "" '/export GOROOT/d' "$shell_profile" - sed -i "" '/$GOROOT\/bin/d' "$shell_profile" - sed -i "" '/export GOPATH/d' "$shell_profile" - sed -i "" '/$GOPATH\/bin/d' "$shell_profile" - fi - else - if [ "$shell" == "fish" ]; then - sed -i '/# GoLang/d' "$shell_profile" - sed -i '/set GOROOT/d' "$shell_profile" - sed -i '/set GOPATH/d' "$shell_profile" - sed -i '/set PATH $GOPATH\/bin $GOROOT\/bin $PATH/d' "$shell_profile" - else - sed -i '/# GoLang/d' "$shell_profile" - sed -i '/export GOROOT/d' "$shell_profile" - sed -i '/$GOROOT\/bin/d' "$shell_profile" - sed -i '/export GOPATH/d' "$shell_profile" - sed -i '/$GOPATH\/bin/d' "$shell_profile" - fi - fi - echo "Go removed." - exit 0 -elif [ "$1" == "--help" ]; then - print_help - exit 0 -elif [ "$1" == "--version" ]; then - if [ -z "$2" ]; then # Check if --version has a second positional parameter - echo "Please provide a version number for: $1" - else - VERSION=$2 - fi -elif [ ! -z "$1" ]; then - echo "Unrecognized option: $1" - exit 1 -fi - -if [ -d "$GOROOT" ]; then - echo "The Go install directory ($GOROOT) already exists. Exiting." - exit 1 -fi - -PACKAGE_NAME="go$VERSION.$PLATFORM.tar.gz" -TEMP_DIRECTORY=$(mktemp -d) - -echo "Downloading $PACKAGE_NAME ..." -if hash wget 2>/dev/null; then - wget https://storage.googleapis.com/golang/$PACKAGE_NAME -O "$TEMP_DIRECTORY/go.tar.gz" -else - curl -o "$TEMP_DIRECTORY/go.tar.gz" https://storage.googleapis.com/golang/$PACKAGE_NAME -fi - -if [ $? -ne 0 ]; then - echo "Download failed! Exiting." - exit 1 -fi - -echo "Extracting File..." -mkdir -p "$GOROOT" - -tar -C "$GOROOT" --strip-components=1 -xzf "$TEMP_DIRECTORY/go.tar.gz" - -echo "Configuring shell profile in: $shell_profile" -touch "$shell_profile" -if [ "$shell" == "fish" ]; then - { - echo '# GoLang' - echo "set GOROOT '${GOROOT}'" - echo "set GOPATH '$GOPATH'" - echo 'set PATH $GOPATH/bin $GOROOT/bin $PATH' - } >> "$shell_profile" -else - { - echo '# GoLang' - echo "export GOROOT=${GOROOT}" - echo 'export PATH=$GOROOT/bin:$PATH' - echo "export GOPATH=$GOPATH" - echo 'export PATH=$GOPATH/bin:$PATH' - } >> "$shell_profile" -fi - -mkdir -p "${GOPATH}/"{src,pkg,bin} -echo -e "\nGo $VERSION was installed into $GOROOT.\nMake sure to relogin into your shell or run:" -echo -e "\n\tsource $shell_profile\n\nto update your environment variables." -echo "Tip: Opening a new terminal window usually just works. :)" -rm -f "$TEMP_DIRECTORY/go.tar.gz" \ No newline at end of file From 934939d1419df7f5b350018fa580dccf52cc8079 Mon Sep 17 00:00:00 2001 From: Ben Racicot <1815385+BenRacicot@users.noreply.github.com> Date: Thu, 4 Feb 2021 22:15:09 -0500 Subject: [PATCH 7/9] Update install-macos.sh Upgraded shell_profile test --- scripts/install-macos.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/install-macos.sh b/scripts/install-macos.sh index ad92b1676..9653246cf 100755 --- a/scripts/install-macos.sh +++ b/scripts/install-macos.sh @@ -25,6 +25,7 @@ function isGo() { if go version; then echo "Golang is installed at $GOPATH" else + # Go install script based on https://github.com/canha/golang-tools-install-script echo "Golang is not installed. Starting Golang install..." VERSION="1.15.7" @@ -66,11 +67,11 @@ function isGo() { exit 1 fi - if $ZSH_VERSION; then + if [ -n "$($SHELL -c 'echo $ZSH_VERSION')" ]; then shell_profile="$HOME/.zshrc" - elif $BASH_VERSION; then - shell_profile="$HOME/.bashrc" - elif $FISH_VERSION; then + elif [ -n "$($SHELL -c 'echo $BASH_VERSION')" ]; then + shell_profile="$HOME/.bashrc" + elif [ -n "$($SHELL -c 'echo $FISH_VERSION')" ]; then shell="fish" if [ -d "$XDG_CONFIG_HOME" ]; then shell_profile="$XDG_CONFIG_HOME/fish/config.fish" From ca959d762c13cc6516f6489256aa30604a084ce3 Mon Sep 17 00:00:00 2001 From: Ben Racicot <1815385+BenRacicot@users.noreply.github.com> Date: Tue, 9 Mar 2021 15:16:20 -0500 Subject: [PATCH 8/9] dependency variable strategy --- scripts/install-macos.sh | 328 ++++++++++++++++++++------------------- 1 file changed, 172 insertions(+), 156 deletions(-) diff --git a/scripts/install-macos.sh b/scripts/install-macos.sh index 9653246cf..ed37d204f 100755 --- a/scripts/install-macos.sh +++ b/scripts/install-macos.sh @@ -2,194 +2,177 @@ # shellcheck disable=SC2016 set -e +# Set this machine's dependencies status(es) with the OK flag +OK=true; + +# Dependency test functions begin here + function isNode() { - clear if node -v; then - echo "Node is installed" - isYarn + OK=true; else - echo "Node is not installed." + OK=false; fi } function isYarn() { if yarn --version; then - echo "Yarn is installed" - isGo + OK=true; + else + OK=false; + fi +} + +function isGit() { + if git --version; then + OK=true; else - echo "Yarn is not installed." + OK=false; fi } function isGo() { if go version; then - echo "Golang is installed at $GOPATH" + OK=true; else - # Go install script based on https://github.com/canha/golang-tools-install-script - echo "Golang is not installed. Starting Golang install..." - - VERSION="1.15.7" - - [ -z "$GOROOT" ] && GOROOT="/usr/local/go" - [ -z "$GOPATH" ] && GOPATH="$HOME/go" - - OS="$(uname -s)" - ARCH="$(uname -m)" - - case $OS in - "Linux") - case $ARCH in - "x86_64") - ARCH=amd64\ - ;; - "aarch64") - ARCH=arm64 - ;; - "armv6" | "armv7l") - ARCH=armv6l - ;; - "armv8") - ARCH=arm64 - ;; - .*386.*) - ARCH=386 - ;; - esac - PLATFORM="linux-$ARCH" - ;; - "Darwin") - PLATFORM="darwin-amd64" - ;; - esac - - if [ -z "$PLATFORM" ]; then - echo "Your operating system is not supported by the script." - exit 1 - fi - - if [ -n "$($SHELL -c 'echo $ZSH_VERSION')" ]; then - shell_profile="$HOME/.zshrc" - elif [ -n "$($SHELL -c 'echo $BASH_VERSION')" ]; then - shell_profile="$HOME/.bashrc" - elif [ -n "$($SHELL -c 'echo $FISH_VERSION')" ]; then - shell="fish" - if [ -d "$XDG_CONFIG_HOME" ]; then - shell_profile="$XDG_CONFIG_HOME/fish/config.fish" - else - shell_profile="$HOME/.config/fish/config.fish" - fi - fi - - echo "shell_profile set to $shell_profile" - - if [ -d "$GOROOT" ]; then - echo "The Go install directory ($GOROOT) already exists. Exiting." - exit 1 - fi - - PACKAGE_NAME="go$VERSION.$PLATFORM.tar.gz" - TEMP_DIRECTORY=$(mktemp -d) - - echo "Downloading $PACKAGE_NAME ..." - if hash wget 2>/dev/null; then - wget https://storage.googleapis.com/golang/$PACKAGE_NAME -O "$TEMP_DIRECTORY/go.tar.gz" - else - curl -o "$TEMP_DIRECTORY/go.tar.gz" https://storage.googleapis.com/golang/$PACKAGE_NAME - fi - - if [ $? -ne 0 ]; then - echo "Download failed! Exiting." - exit 1 - fi - - echo "Extracting File..." - mkdir -p "$GOROOT" - - tar -C "$GOROOT" --strip-components=1 -xzf "$TEMP_DIRECTORY/go.tar.gz" - - echo "Configuring shell profile in: $shell_profile" - touch "$shell_profile" - if [ "$shell" == "fish" ]; then - { - echo '# GoLang' - echo "set GOROOT '${GOROOT}'" - echo "set GOPATH '$GOPATH'" - echo 'set PATH $GOPATH/bin $GOROOT/bin $PATH' - } >> "$shell_profile" - else - { - echo '# GoLang' - echo "export GOROOT=${GOROOT}" - echo 'export PATH=$GOROOT/bin:$PATH' - echo "export GOPATH=$GOPATH" - echo 'export PATH=$GOPATH:$PATH' - } >> "$shell_profile" - fi - - mkdir -p "${GOPATH}/"{src,pkg,bin} - echo -e "\nGo $VERSION was installed into $GOROOT.\nMake sure to relogin into your shell or run:" - echo -e "\n\tsource $shell_profile\n\nto update your environment variables." - echo "Tip: Opening a new terminal window usually just works. :)" - rm -f "$TEMP_DIRECTORY/go.tar.gz" - exit + OK=false; fi +} - cloneIntoDir +function isGlide() { + if glide --version; then + OK=true; + else + OK=false; + fi } -# Once we have Go working finish the install processes inside the development directory to avoid errors (Glide) -function cloneIntoDir() { - if go version; then - echo "Setting up Kelp folders in the Golang working directory" - echo $GOPATH - cd $GOPATH +# Installation functions begin here + +function installGo() { + echo 'Installing Golang on your machine.' + # Go install script based on https://github.com/canha/golang-tools-install-script + VERSION="1.15.7" + + [ -z "$GOROOT" ] && GOROOT="/usr/local/go" + [ -z "$GOPATH" ] && GOPATH="$HOME/go" + + OS="$(uname -s)" + ARCH="$(uname -m)" + + case $OS in + "Linux") + case $ARCH in + "x86_64") + ARCH=amd64\ + ;; + "aarch64") + ARCH=arm64 + ;; + "armv6" | "armv7l") + ARCH=armv6l + ;; + "armv8") + ARCH=arm64 + ;; + .*386.*) + ARCH=386 + ;; + esac + PLATFORM="linux-$ARCH" + ;; + "Darwin") + PLATFORM="darwin-amd64" + ;; + esac + + if [ -z "$PLATFORM" ]; then + echo "Your operating system is not supported by the script." + exit 1 + fi - # pwd - sudo mkdir github.com/stellar/kelp + if [ -n "$($SHELL -c 'echo $BASH_VERSION')" ]; then + shell_profile="$HOME/.bashrc" + else + echo "Kelp requires bash" + fi - echo "Cloning Kelp into $GOPATH/src/github.com/stellar/kelp" - git clone https://github.com/stellar/kelp.git $GOPATH/src/github.com/stellar/kelp + if [ -d "$GOROOT" ]; then + echo "The Go install directory ($GOROOT) already exists. Exiting." + exit 1 + fi - cd $GOPATH/src/github.com/stellar/kelp + PACKAGE_NAME="go$VERSION.$PLATFORM.tar.gz" + TEMP_DIRECTORY=$(mktemp -d) - isGlide - else - echo "Golang not installed, try again." - exit + echo "Downloading $PACKAGE_NAME ..." + if hash wget 2>/dev/null; then + wget https://storage.googleapis.com/golang/$PACKAGE_NAME -O "$TEMP_DIRECTORY/go.tar.gz" + else + curl -o "$TEMP_DIRECTORY/go.tar.gz" https://storage.googleapis.com/golang/$PACKAGE_NAME fi -} -function isGlide() { - if glide --version; then - echo "Glide is installed" - else - echo "Installing Glide." - if curl --version; then - curl https://glide.sh/get | sh - elif wget --version; then - wget https://glide.sh/get | sh - else - echo "curl and wget are not available, install glide manually https://github.com/Masterminds/glide" - exit - fi + if [ $? -ne 0 ]; then + echo "Download failed! Exiting." + exit 1 fi - isAstilectron + echo "Extracting File..." + + sudo chown -R $USER: $HOME # https://github.com/golang/go/issues/27187 + mkdir -p "$GOROOT" + + tar -C "$GOROOT" --strip-components=1 -xzf "$TEMP_DIRECTORY/go.tar.gz" + + GOROOT=${GOROOT} + PATH=$GOROOT/bin:$PATH + GOPATH=$GOPATH + PATH=$GOPATH:$PATH + + mkdir -p "${GOPATH}/"{src,pkg,bin} + echo -e "\nGo $VERSION was installed into $GOROOT.\nMake sure to relogin into your shell or run:" + echo -e "\n\ restart script to update your environment variables." + echo "Tip: Opening a new terminal window usually just works. :)" + rm -f "$TEMP_DIRECTORY/go.tar.gz" + exit } -function isAstilectron() { - if go version; then - go get -u github.com/asticode/go-astilectron-bundler/... - go install github.com/asticode/go-astilectron-bundler/astilectron-bundler +# Once we have Golang; finish the install processes inside the development directory to avoid errors (Glide) +function cloneIntoDir() { + echo "Setting up Kelp folders in the Golang working directory" + echo $GOPATH + cd $GOPATH + + # pwd + sudo mkdir github.com/stellar/kelp + + echo "Cloning Kelp into $GOPATH/src/github.com/stellar/kelp" + git clone https://github.com/stellar/kelp.git $GOPATH/src/github.com/stellar/kelp + + cd $GOPATH/src/github.com/stellar/kelp +} + +# After Golang install Glide +function installGlide() { + echo "Installing Glide." + if curl --version; then + curl https://glide.sh/get | sh + elif wget --version; then + wget https://glide.sh/get | sh else - echo "Golang cannot install Astilectron" + echo "curl and wget are not available, install glide manually https://github.com/Masterminds/glide" exit fi +} - buildAndRun +# After Glide install Astilectron +function installAstilectron() { + go get -u github.com/asticode/go-astilectron-bundler/... + go install github.com/asticode/go-astilectron-bundler/astilectron-bundler } -function buildAndRun() { +# Finally install build Kelp and run it +function buildKelpAndRun() { echo "Building Kelp binaries" ./scripts/build.sh @@ -205,6 +188,39 @@ function buildAndRun() { } isNode - -echo "Remember, PostgreSQL must be running to store data." -echo "Remember, Docker and CCXT must be configured for the expanded set of priceFeeds and orderbooks." +if [ $OK ]; then + echo "Node is installed on your machine." +else + echo "Node is not installed on your machine!" + exit 1 +fi + +isYarn +if [ $OK ]; then + echo "Yarn is installed on your machine." +else + echo "Yarn is not installed on your machine!" + exit 1 +fi + +isGit +if [ $OK ]; then + echo "Git is installed on your machine." +else + echo "Git is not installed on your machine!" + exit 1 +fi + +isGo +echo $OK +if $OK; then + echo "true for some reason" + cloneIntoDir + isGlide + installAstilectron + buildAndRun + echo "Remember, PostgreSQL must be running to store data." + echo "Remember, Docker and CCXT must be configured for the expanded set of priceFeeds and orderbooks." +else + installGo +fi From 59d1cdd14b7cbbe4094fb2fa0b96d426eef52ff6 Mon Sep 17 00:00:00 2001 From: benracicot Date: Thu, 11 Mar 2021 16:43:05 -0500 Subject: [PATCH 9/9] ben/nikhil peer-coding session --- scripts/install-macos.sh | 116 ++++++++++++++++++++++++++------------- 1 file changed, 79 insertions(+), 37 deletions(-) diff --git a/scripts/install-macos.sh b/scripts/install-macos.sh index ed37d204f..c52ab7d0f 100755 --- a/scripts/install-macos.sh +++ b/scripts/install-macos.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # shellcheck disable=SC2016 set -e @@ -54,7 +54,7 @@ function installGo() { # Go install script based on https://github.com/canha/golang-tools-install-script VERSION="1.15.7" - [ -z "$GOROOT" ] && GOROOT="/usr/local/go" + [ -z "$GOROOT" ] && GOROOT="$HOME/go/go-install-do-not-delete" [ -z "$GOPATH" ] && GOPATH="$HOME/go" OS="$(uname -s)" @@ -91,15 +91,23 @@ function installGo() { exit 1 fi - if [ -n "$($SHELL -c 'echo $BASH_VERSION')" ]; then + if [ '/bin/bash' == `which bash` ]; then shell_profile="$HOME/.bashrc" + echo "bash is installed" else echo "Kelp requires bash" fi + { + echo '# GoLang' + echo "export GOROOT=${GOROOT}" + echo 'export PATH=$GOROOT/bin:$PATH' + echo "export GOPATH=$GOPATH" + echo 'export PATH=$GOPATH:$PATH' + } >> "$shell_profile" + if [ -d "$GOROOT" ]; then - echo "The Go install directory ($GOROOT) already exists. Exiting." - exit 1 + echo "The Go install directory ($GOROOT) already exists." fi PACKAGE_NAME="go$VERSION.$PLATFORM.tar.gz" @@ -119,35 +127,36 @@ function installGo() { echo "Extracting File..." - sudo chown -R $USER: $HOME # https://github.com/golang/go/issues/27187 + # sudo chown -R $USER: $HOME # https://github.com/golang/go/issues/27187 mkdir -p "$GOROOT" tar -C "$GOROOT" --strip-components=1 -xzf "$TEMP_DIRECTORY/go.tar.gz" - GOROOT=${GOROOT} - PATH=$GOROOT/bin:$PATH - GOPATH=$GOPATH - PATH=$GOPATH:$PATH + # GOROOT=${GOROOT} + # PATH=$GOROOT/bin:$PATH + # GOPATH=$GOPATH + # PATH=$GOPATH:$PATH mkdir -p "${GOPATH}/"{src,pkg,bin} echo -e "\nGo $VERSION was installed into $GOROOT.\nMake sure to relogin into your shell or run:" echo -e "\n\ restart script to update your environment variables." echo "Tip: Opening a new terminal window usually just works. :)" rm -f "$TEMP_DIRECTORY/go.tar.gz" - exit } # Once we have Golang; finish the install processes inside the development directory to avoid errors (Glide) function cloneIntoDir() { echo "Setting up Kelp folders in the Golang working directory" - echo $GOPATH - cd $GOPATH - - # pwd - sudo mkdir github.com/stellar/kelp - - echo "Cloning Kelp into $GOPATH/src/github.com/stellar/kelp" - git clone https://github.com/stellar/kelp.git $GOPATH/src/github.com/stellar/kelp + + # check github.com/stellar/kelp + if [ -d "$GOPATH/github.com/stellar/kelp" ]; then + echo "Kelp dir exists, no need to clone." + else + # pwd + mkdir -p $GOPATH/github.com/stellar/kelp + echo "Cloning Kelp into $GOPATH/src/github.com/stellar/kelp" + git clone https://github.com/stellar/kelp.git $GOPATH/src/github.com/stellar/kelp + fi cd $GOPATH/src/github.com/stellar/kelp } @@ -163,6 +172,8 @@ function installGlide() { echo "curl and wget are not available, install glide manually https://github.com/Masterminds/glide" exit fi + + glide install } # After Glide install Astilectron @@ -171,22 +182,55 @@ function installAstilectron() { go install github.com/asticode/go-astilectron-bundler/astilectron-bundler } -# Finally install build Kelp and run it -function buildKelpAndRun() { - echo "Building Kelp binaries" - ./scripts/build.sh +function postGoInstall() { + cloneIntoDir + isGlide + installAstilectron + + checkDeps + echo "Remember, PostgreSQL must be running to store data." + echo "Remember, Docker and CCXT must be configured for the expanded set of priceFeeds and orderbooks." + echo "Run everything related to Kelp in BASH shell only." + echo "All dependencies successfully installed. Run build script from $GOPATH/src/github.com/stellar/kelp/scripts/build.sh" +} - echo "Confirming the Kelp binary exists with version information." - if ./bin/kelp version; then - echo "Kelp has built successfully" - else - echo "The Kelp build was not successful" +# Utility function for checking dependency statuses +function checkDeps(){ + isNode + if [ $OK ]; then + echo "Node `node -v` is installed" + else + echo "Node is not installed" fi - echo "run the GUI" - ./bin/kelp server + isYarn + if [ $OK ]; then + echo "Yarn `yarn -v` is installed" + else + echo "Yarn is not installed" + fi + + isGit + if [ $OK ]; then + echo "`git version` is installed" + else + echo "Git is not installed" + fi + + isGo + if $OK; then + echo "`go version` is installed" + else + echo "Goland is not installed" + fi } + +#********************** +# Execute the functions +#********************** +cd + isNode if [ $OK ]; then echo "Node is installed on your machine." @@ -212,15 +256,13 @@ else fi isGo -echo $OK if $OK; then echo "true for some reason" - cloneIntoDir - isGlide - installAstilectron - buildAndRun - echo "Remember, PostgreSQL must be running to store data." - echo "Remember, Docker and CCXT must be configured for the expanded set of priceFeeds and orderbooks." else installGo + echo "Finished installing Golang, now sourcing from .bashrc" + source $HOME/.bashrc fi + +echo "Go version = $((go version))" +postGoInstall