Fixing issue where weather would not find the location

In a state such as conencticut with a shortned name CT it doesnt work to grab the first two letters CO.
This commit is contained in:
Alex Epstein 2018-01-02 19:20:26 -05:00
parent 0e24bf81f0
commit c60f888b32
1 changed files with 0 additions and 2 deletions

View File

@ -43,8 +43,6 @@ getIPWeather()
region=$(httpGet ipinfo.io/region) > /dev/null
if [[ $(echo $region | wc -w) == 2 ]];then
region=$(echo $region | grep -Eo "[A-Z]*" | tr -d "[:space:]")
else
region=$(echo "$region" | cut -c "1-2" | tr "[:lower:]" "[:upper:]")
fi
httpGet $locale.wttr.in/$city,$region$1
else ## otherwise we are going to use longitude and latitude