ugly minor intro bugfixes

This commit is contained in:
Luke Smith 2020-04-30 10:31:46 -04:00
parent 53ef201c08
commit 60a467de7c
No known key found for this signature in database
GPG key ID: 4C50B54A911F6252

View file

@ -8,8 +8,7 @@
coins="Bitcoin;btc;💰
Etherium;eth;🍸
Basic Attention Token;bat;🦁
LBC;lbc;📚
"
LBC;lbc;📚"
# Directory where currency info is stored.
dir="${XDG_DATA_HOME:-$HOME/.local/share}/crypto-prices"
@ -33,7 +32,7 @@ printprices() { # Print/format all prices
done | sed 's/ $//'
}
mkdir -p "$dir"
[ ! -d "$dir" ] && mkdir -p "$dir" && { getprices; exit ;}
# If currencies haven't been updated today, try to update them.
[ "$(stat -c %x "$HOME/.local/share/crypto-prices" | cut -d' ' -f1)" != "$(date '+%Y-%m-%d')" ] &&