Add a rather ugly percentage counter
This commit is contained in:
parent
eddeff6618
commit
8c9b053b44
7
cv
7
cv
|
@ -26,6 +26,12 @@ get(){
|
|||
jq -r ".$1" < "$data/$date-$country"
|
||||
fi
|
||||
}
|
||||
getpct(){
|
||||
# FIXME: Seriously, this is ugly as fuck. Fix ASAP!
|
||||
# Also don't get this out of dev, kthx
|
||||
w=10
|
||||
printf "║ %-${w}s ║ %${w}s ║ %-${w}s ║\n" "" "$(echo "$(bc <<< "scale = 1; $(get $1) / 10000") %")" ""
|
||||
}
|
||||
yget(){
|
||||
date=$ydate
|
||||
if [ -f "$data/$date-$country" ]
|
||||
|
@ -63,6 +69,7 @@ result(){
|
|||
out Recovered recovered
|
||||
out Tests tests
|
||||
out "╰> Per 1M" testsPerOneMillion
|
||||
getpct testsPerOneMillion
|
||||
if [ ! -f $data/$ydate-$country ] || [ $(get todayCases) == "0" ]
|
||||
then
|
||||
frame line
|
||||
|
|
Reference in New Issue