Skip to content

Commit

Permalink
Fix curl error "failed writing body"
Browse files Browse the repository at this point in the history
  • Loading branch information
sgtpep committed Jan 30, 2015
1 parent 3e30606 commit 8436b5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion root.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ mirror-url() {
fi

for _ in {1..3}; do
local country_code=`curl -f http://www.geoiptool.com/ | grep -m 1 -A 1 "Country Code:" | grep -oP "(?<=<span>).+(?= \()" || :`
local country_code=`curl -f http://www.geoiptool.com/ | tr -d -c "[:print:]\n" | grep -m 1 -A 1 "Country Code:" | grep -oP "(?<=<span>).+(?= \()" || :`
[[ ! $country_code ]] || break
done

Expand Down

0 comments on commit 8436b5f

Please sign in to comment.