mirror of
https://github.com/SqrtMinusOne/dotfiles.git
synced 2025-12-11 03:33:03 +03:00
Process Unknown location in weather
This commit is contained in:
parent
ab4aadffa7
commit
587d6edb6a
1 changed files with 3 additions and 0 deletions
|
|
@ -7,6 +7,9 @@ format_2=${FORMAT_1:-"format=v2n"}
|
|||
bar_weather=$(curl -s wttr.in/${location}?format=${bar_format} || echo "??")
|
||||
if [ -z ${bar_weather} ]; then
|
||||
exit 1
|
||||
elif [[ ${bar_weather} == *"Unknown"* ]]; then
|
||||
echo "??"
|
||||
exit 1
|
||||
fi
|
||||
echo ${bar_weather}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue