mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-25 08:15:15 +00:00
update setup-grid script
This commit is contained in:
parent
581538475d
commit
931f812e32
|
@ -7,25 +7,29 @@ curl -L -o bbgo https://github.com/c9s/bbgo/releases/download/$version/bbgo-$osf
|
||||||
chmod +x bbgo
|
chmod +x bbgo
|
||||||
echo "Binary downloaded"
|
echo "Binary downloaded"
|
||||||
|
|
||||||
|
function gen_dotenv()
|
||||||
if [[ -e ".env.local" ]] ; then
|
{
|
||||||
echo "Found existing .env.local, you will overwrite the existing .env.local file!"
|
read -p "Enter your MAX API key: " api_key
|
||||||
read -p "Are you sure? (Y/n) " a
|
read -p "Enter your MAX API secret: " api_secret
|
||||||
if [[ $a == "n" ]] ; then
|
echo "Generating your .env.local file..."
|
||||||
exit
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
read -p "Enter your MAX API key: " api_key
|
|
||||||
|
|
||||||
read -p "Enter your MAX API secret: " api_secret
|
|
||||||
|
|
||||||
echo "Generating your .env.local file..."
|
|
||||||
cat <<END > .env.local
|
cat <<END > .env.local
|
||||||
export MAX_API_KEY=$api_key
|
export MAX_API_KEY=$api_key
|
||||||
export MAX_API_SECRET=$api_secret
|
export MAX_API_SECRET=$api_secret
|
||||||
END
|
END
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if [[ -e ".env.local" ]] ; then
|
||||||
|
echo "Found existing .env.local, you will overwrite the existing .env.local file!"
|
||||||
|
read -p "Are you sure? (Y/n) " a
|
||||||
|
if [[ $a != "n" ]] ; then
|
||||||
|
gen_dotenv
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
gen_dotenv
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [[ -e "bbgo.yaml" ]] ; then
|
if [[ -e "bbgo.yaml" ]] ; then
|
||||||
echo "Found existing bbgo.yaml, you will overwrite the existing bbgo.yaml file!"
|
echo "Found existing bbgo.yaml, you will overwrite the existing bbgo.yaml file!"
|
||||||
read -p "Are you sure? (Y/n) " a
|
read -p "Are you sure? (Y/n) " a
|
||||||
|
|
Loading…
Reference in New Issue
Block a user