From 07d9734ba040e5df0e1a81fc2fde742a08d0c449 Mon Sep 17 00:00:00 2001 From: Michael De Roover Date: Mon, 10 Aug 2020 17:10:13 +0200 Subject: [PATCH] Make the code a bit cleaner --- cv | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/cv b/cv index d6bc59d..cf124bc 100755 --- a/cv +++ b/cv @@ -56,6 +56,8 @@ frame(){ esac } result(){ + frame top + title "Queried at: $date" frame up frame table out Total cases @@ -102,21 +104,10 @@ then ydate=$(date -d "2 days ago" $dfmt) fi -frame top -title "Queried at: $date" if [ ! -z "$country" ] then - # This is to be phased out in favor of worldwide stats - # in the else statement. - if [ "$country" == "all" ] - then - endpoint=all - country=world - result - else - endpoint=countries/$country - result - fi + endpoint=countries/$country + result else endpoint=all country=world