Use unset (#155)
This commit is contained in:
parent
39417507a3
commit
d861b1ad15
|
@ -1,10 +1,10 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Author: Alexander Epstein https://github.com/alexanderepstein
|
# Author: Alexander Epstein https://github.com/alexanderepstein
|
||||||
|
|
||||||
base=""
|
unset base
|
||||||
exchangeTo=""
|
unset exchangeTo
|
||||||
currentVersion="1.20.0"
|
currentVersion="1.20.0"
|
||||||
configuredClient=""
|
unset configuredClient
|
||||||
currencyCodes=(AUD BGN BRL CAD CHF CNY CZK DKK
|
currencyCodes=(AUD BGN BRL CAD CHF CNY CZK DKK
|
||||||
EUR GBP HKD HRK HUF IDR ILS INR
|
EUR GBP HKD HRK HUF IDR ILS INR
|
||||||
JPY KRW MXN MYR NOK NZD PHP PLN
|
JPY KRW MXN MYR NOK NZD PHP PLN
|
||||||
|
@ -13,7 +13,7 @@ currencyCodes=(AUD BGN BRL CAD CHF CNY CZK DKK
|
||||||
## This function determines which http get tool the system has installed and returns an error if there isnt one
|
## This function determines which http get tool the system has installed and returns an error if there isnt one
|
||||||
getConfiguredClient()
|
getConfiguredClient()
|
||||||
{
|
{
|
||||||
if command -v curl &>/dev/null; then
|
if command -v curl &>/dev/null; then
|
||||||
configuredClient="curl"
|
configuredClient="curl"
|
||||||
elif command -v wget &>/dev/null; then
|
elif command -v wget &>/dev/null; then
|
||||||
configuredClient="wget"
|
configuredClient="wget"
|
||||||
|
@ -54,7 +54,7 @@ getBase()
|
||||||
echo -n "What is the base currency: "
|
echo -n "What is the base currency: "
|
||||||
read -r base
|
read -r base
|
||||||
base=$(echo $base | tr /a-z/ /A-Z/)
|
base=$(echo $base | tr /a-z/ /A-Z/)
|
||||||
if [[ $(checkValidCurrency $base) == "1" ]]; then
|
if [[ $(checkValidCurrency $base) == "1" ]]; then
|
||||||
unset base
|
unset base
|
||||||
echo "Invalid base currency"
|
echo "Invalid base currency"
|
||||||
getBase
|
getBase
|
||||||
|
|
Loading…
Reference in New Issue