Change data directory
This commit is contained in:
parent
545ffb989c
commit
00144d8b97
15
cv
15
cv
@ -11,20 +11,22 @@ else
|
||||
}
|
||||
fi
|
||||
|
||||
if [ ! -d /tmp/cv ]
|
||||
data="$HOME/Documents/cv"
|
||||
|
||||
if [ ! -d $data ]
|
||||
then
|
||||
mkdir /tmp/cv
|
||||
ex "mkdir $data"
|
||||
fi
|
||||
|
||||
country=$1
|
||||
|
||||
get(){
|
||||
if [ -f /tmp/cv/$date-$country ]
|
||||
if [ -f $data/$date-$country ]
|
||||
then
|
||||
cat /tmp/cv/$date-$country
|
||||
cat $data/$date-$country
|
||||
else
|
||||
curl -sL corona.lmao.ninja/v2/$endpoint > /tmp/cv/$date-$country
|
||||
cat /tmp/cv/$date-$country
|
||||
curl -sL corona.lmao.ninja/v2/$endpoint > $data/$date-$country
|
||||
cat $data/$date-$country
|
||||
fi
|
||||
}
|
||||
result(){
|
||||
@ -46,6 +48,7 @@ then
|
||||
result
|
||||
fi
|
||||
else
|
||||
# Change this to your own country as desired.
|
||||
country=Belgium
|
||||
show "Country has been set to $country."
|
||||
endpoint=countries/$country
|
||||
|
Reference in New Issue
Block a user