Auto apply default values in setup.
Before this commit, during setup, even a default value is displayed for some config, if user doesn't enter anything, an empty value is applied. After this commit, if user doesn't enter anything for a config with default value, the default value will be applied.
This commit is contained in:
parent
743a1f1604
commit
c7ef69f4eb
16
setup.sh
16
setup.sh
@ -89,13 +89,21 @@ function config_generator () {
|
|||||||
echo "General configuration"
|
echo "General configuration"
|
||||||
echo "-------------------------"
|
echo "-------------------------"
|
||||||
echo
|
echo
|
||||||
read -p "Max open trades: (Default: 3) " max_trades
|
default_max_trades=3
|
||||||
|
read -p "Max open trades: (Default: $default_max_trades) " max_trades
|
||||||
|
max_trades=${max_trades:-$default_max_trades}
|
||||||
|
|
||||||
read -p "Stake amount: (Default: 0.05) " stake_amount
|
default_stake_amount=0.05
|
||||||
|
read -p "Stake amount: (Default: $default_stake_amount) " stake_amount
|
||||||
|
stake_amount=${stake_amount:-$default_stake_amount}
|
||||||
|
|
||||||
read -p "Stake currency: (Default: BTC) " stake_currency
|
default_stake_currency="BTC"
|
||||||
|
read -p "Stake currency: (Default: $default_stake_currency) " stake_currency
|
||||||
|
stake_currency=${stake_currency:-$default_stake_currency}
|
||||||
|
|
||||||
read -p "Fiat currency: (Default: USD) " fiat_currency
|
default_fiat_currency="USD"
|
||||||
|
read -p "Fiat currency: (Default: $default_fiat_currency) " fiat_currency
|
||||||
|
fiat_currency=${fiat_currency:-$default_fiat_currency}
|
||||||
|
|
||||||
echo "------------------------"
|
echo "------------------------"
|
||||||
echo "Bittrex config generator"
|
echo "Bittrex config generator"
|
||||||
|
Loading…
Reference in New Issue
Block a user