bbgo_origin/scripts/download.sh

33 lines
535 B
Bash
Raw Normal View History

2020-12-29 09:37:21 +00:00
#!/bin/bash
2021-04-28 09:56:46 +00:00
set -e
2020-12-29 09:37:21 +00:00
osf=$(uname | tr '[:upper:]' '[:lower:]')
2021-04-28 09:56:46 +00:00
version=v1.15.2
dist_file=bbgo-$version-$osf-amd64.tar.gz
2020-12-29 09:37:21 +00:00
2021-04-28 09:56:46 +00:00
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
NC='\033[0m' # No Color
2020-12-29 09:46:13 +00:00
2021-04-28 09:56:46 +00:00
function warn()
{
echo -e "${YELLOW}$@${NC}"
}
function error()
{
echo -e "${RED}$@${NC}"
}
2020-12-29 09:46:13 +00:00
2021-04-28 09:56:46 +00:00
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
info "downloaded successfully"