From 5cddec93ef212bc9d8a6f2a660c9abb847aaa7ec Mon Sep 17 00:00:00 2001 From: c9s Date: Wed, 28 Apr 2021 17:56:46 +0800 Subject: [PATCH] upgrade setup script to v1.15.2 --- scripts/download.sh | 35 +++++++++++++++++++++++++++-------- scripts/setup-bollgrid.sh | 2 +- scripts/setup-grid.sh | 2 +- scripts/setup.sh | 2 +- 4 files changed, 30 insertions(+), 11 deletions(-) diff --git a/scripts/download.sh b/scripts/download.sh index c90b83f70..767fcf3e0 100755 --- a/scripts/download.sh +++ b/scripts/download.sh @@ -1,13 +1,32 @@ #!/bin/bash +set -e osf=$(uname | tr '[:upper:]' '[:lower:]') -version=v1.6.0 +version=v1.15.2 +dist_file=bbgo-$version-$osf-amd64.tar.gz -if [[ -n $1 ]] ; then - version=$1 -fi +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[0;33m' +NC='\033[0m' # No Color -echo "downloading bbgo $version" -curl -L -o bbgo https://github.com/c9s/bbgo/releases/download/$version/bbgo-$osf +function warn() +{ + echo -e "${YELLOW}$@${NC}" +} + +function error() +{ + echo -e "${RED}$@${NC}" +} + +function info() +{ + echo -e "${GREEN}$@${NC}" +} + +info "downloading..." +curl -O -L https://github.com/c9s/bbgo/releases/download/$version/$dist_file +tar xzf $dist_file +mv bbgo-$osf bbgo chmod +x bbgo - -echo "bbgo is downloaded at ./bbgo" +info "downloaded successfully" diff --git a/scripts/setup-bollgrid.sh b/scripts/setup-bollgrid.sh index f0fa090ff..43fdcb808 100755 --- a/scripts/setup-bollgrid.sh +++ b/scripts/setup-bollgrid.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e osf=$(uname | tr '[:upper:]' '[:lower:]') -version=v1.14.0 +version=v1.15.2 dist_file=bbgo-$version-$osf-amd64.tar.gz RED='\033[0;31m' diff --git a/scripts/setup-grid.sh b/scripts/setup-grid.sh index efdbb1b5c..8726fa49c 100755 --- a/scripts/setup-grid.sh +++ b/scripts/setup-grid.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e osf=$(uname | tr '[:upper:]' '[:lower:]') -version=v1.14.0 +version=v1.15.2 dist_file=bbgo-$version-$osf-amd64.tar.gz RED='\033[0;31m' diff --git a/scripts/setup.sh b/scripts/setup.sh index b56b45de3..98da53abe 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash osf=$(uname | tr '[:upper:]' '[:lower:]') -version=v1.6.0 +version=v1.15.2 echo "Downloading bbgo" curl -L -o bbgo https://github.com/c9s/bbgo/releases/download/$version/bbgo-$osf