diff --git a/scripts/setup-bollgrid.sh b/scripts/setup-bollgrid.sh index 43fdcb808..59e662a3f 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.15.2 +version=v1.15.3 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 8726fa49c..393202d7f 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.15.2 +version=v1.15.3 dist_file=bbgo-$version-$osf-amd64.tar.gz RED='\033[0;31m' diff --git a/scripts/setup.sh b/scripts/setup.sh index 98da53abe..c1b5770dc 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -1,11 +1,35 @@ #!/bin/bash +set -e osf=$(uname | tr '[:upper:]' '[:lower:]') -version=v1.15.2 +version=v1.15.3 +dist_file=bbgo-$version-$osf-amd64.tar.gz -echo "Downloading bbgo" -curl -L -o bbgo https://github.com/c9s/bbgo/releases/download/$version/bbgo-$osf +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[0;33m' +NC='\033[0m' # No Color + +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 "Binary downloaded" +info "downloaded successfully" if [[ -e "bbgo.yaml" ]] ; then echo "Found existing bbgo.yaml, you will overwrite the existing bbgo.yaml file!"