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