Fix issue with querying yesterday's stats without a data file

This commit is contained in:
2020-05-12 14:49:08 +02:00
parent 34dbc57e75
commit 0eaf2a62a9

5
cv
View File

@@ -41,6 +41,8 @@ result(){
echo "Active: $(get active)"
echo "New: $(get todayCases)"
echo "Tests: $(get tests)"
if [ -f $data/$ydate-$country ]
then
show "Yesterday's stats:"
echo "New: $(yget todayCases)"
if [ $(get todayCases) == "0" ]
@@ -59,6 +61,9 @@ result(){
ex "rm $data/$date-$country"
fi
fi
else
show "Yesterday's data file for this country doesn't exist."
fi
}
show "Queried at: $date"