Remove data files when they're not yet updated
This commit is contained in:
6
cv
6
cv
@@ -36,6 +36,12 @@ result(){
|
|||||||
echo "Active: $(get | jq -r '.active')"
|
echo "Active: $(get | jq -r '.active')"
|
||||||
echo "Today: $(get | jq -r '.todayCases')"
|
echo "Today: $(get | jq -r '.todayCases')"
|
||||||
echo "Tests: $(get | jq -r '.tests')"
|
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"
|
show "Queried at: $date"
|
||||||
|
Reference in New Issue
Block a user