weather: if no data, exit
This commit is contained in:
parent
6194f40e0d
commit
969e72f605
1 changed files with 5 additions and 0 deletions
|
@ -20,4 +20,9 @@ DATA=($(curl -s "${WHOLE}" \
|
|||
|
||||
DESC="${DATA[@]:2}"
|
||||
|
||||
# If no data, exit
|
||||
if [[ $DATA == *"null"* ]]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
printf "${LOCATION}: ${DESC:1:-1}, ${DATA[0]}°C (feels like ${DATA[1]}°C)\n"
|
||||
|
|
Loading…
Reference in a new issue