mirror of
https://github.com/alexanderepstein/Bash-Snippets
synced 2018-11-08 02:59:35 +01:00
Changing endpoint in currency conversion
This commit is contained in:
parent
0b291d241a
commit
b270518de8
1 changed files with 1 additions and 1 deletions
|
@ -136,7 +136,7 @@ checkInternet()
|
|||
## Grabs the exchange rate and does the math for converting the currency
|
||||
convertCurrency()
|
||||
{
|
||||
exchangeRate=$(httpGet "https://exchangeratesapi.io/api/latest?base=$base&symbols=$base,$exchangeTo" | grep -Eo "[0-9]*[.][0-9]*") > /dev/null
|
||||
exchangeRate=$(httpGet "https://api.exchangeratesapi.io/latest?base=$base&symbols=$base,$exchangeTo" | grep -Eo "[0-9]*[.][0-9]*") > /dev/null
|
||||
if ! command -v bc &>/dev/null; then
|
||||
oldRate=$exchangeRate
|
||||
exchangeRate=$(echo $exchangeRate | grep -Eo "^[0-9]*" )
|
||||
|
|
Loading…
Reference in a new issue