ugly minor intro bugfixes
This commit is contained in:
parent
53ef201c08
commit
60a467de7c
1 changed files with 2 additions and 3 deletions
|
@ -8,8 +8,7 @@
|
||||||
coins="Bitcoin;btc;💰
|
coins="Bitcoin;btc;💰
|
||||||
Etherium;eth;🍸
|
Etherium;eth;🍸
|
||||||
Basic Attention Token;bat;🦁
|
Basic Attention Token;bat;🦁
|
||||||
LBC;lbc;📚
|
LBC;lbc;📚"
|
||||||
"
|
|
||||||
|
|
||||||
# Directory where currency info is stored.
|
# Directory where currency info is stored.
|
||||||
dir="${XDG_DATA_HOME:-$HOME/.local/share}/crypto-prices"
|
dir="${XDG_DATA_HOME:-$HOME/.local/share}/crypto-prices"
|
||||||
|
@ -33,7 +32,7 @@ printprices() { # Print/format all prices
|
||||||
done | sed 's/ $//'
|
done | sed 's/ $//'
|
||||||
}
|
}
|
||||||
|
|
||||||
mkdir -p "$dir"
|
[ ! -d "$dir" ] && mkdir -p "$dir" && { getprices; exit ;}
|
||||||
|
|
||||||
# If currencies haven't been updated today, try to update them.
|
# 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')" ] &&
|
[ "$(stat -c %x "$HOME/.local/share/crypto-prices" | cut -d' ' -f1)" != "$(date '+%Y-%m-%d')" ] &&
|
||||||
|
|
Loading…
Reference in a new issue