Remove data files when they're not yet updated

This commit is contained in:
2020-05-04 14:09:08 +02:00
parent 3bf8a5ffae
commit e25cb844e4

6
cv
View File

@@ -36,6 +36,12 @@ result(){
echo "Active: $(get | jq -r '.active')"
echo "Today: $(get | jq -r '.todayCases')"
echo "Tests: $(get | jq -r '.tests')"
if [ $(get | jq -r '.todayCases') == "0" ]
then
show "Seems like the cases today are not yet updated."
show "The data file will be removed. Please query again later."
ex "rm $data/$date-$country"
fi
}
show "Queried at: $date"