mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2024-12-25 12:44:35 +00:00
Fix bitcoin price script
This commit is contained in:
parent
900f5f2706
commit
c01d292933
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
BTC_DATA=$(curl https://api.coindesk.com/v1/bpi/currentprice.json 2>/dev/null | echo 'ERR')
|
||||
BTC_DATA=$(curl https://api.coindesk.com/v1/bpi/currentprice.json 2>/dev/null || echo 'ERR')
|
||||
|
||||
if [ "$BTC_DATA" != "ERR" ]; then
|
||||
BTC_PRICE=$(echo $BTC_DATA | jq -r ".bpi.USD.rate_float")
|
||||
|
|
Loading…
Reference in a new issue