weather: if no data, exit
This commit is contained in:
parent
6194f40e0d
commit
969e72f605
|
@ -20,4 +20,9 @@ DATA=($(curl -s "${WHOLE}" \
|
||||||
|
|
||||||
DESC="${DATA[@]:2}"
|
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"
|
printf "${LOCATION}: ${DESC:1:-1}, ${DATA[0]}°C (feels like ${DATA[1]}°C)\n"
|
||||||
|
|
Loading…
Reference in New Issue