Skip to content

Commit

Permalink
Fixing issue where weather would not find the location
Browse files Browse the repository at this point in the history
In a state such as conencticut with a shortned name CT it doesnt work to grab the first two letters CO.
  • Loading branch information
Alex Epstein committed Jan 3, 2018
1 parent 0e24bf8 commit c60f888
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions weather/weather
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c60f888

Please sign in to comment.