Simplify proxy check

This commit is contained in:
Steven Penny 2014-06-14 19:44:49 -05:00
parent 67658a514a
commit 59c523600f
1 changed files with 5 additions and 10 deletions

15
apt-cyg
View File

@ -342,18 +342,13 @@ proxy () {
shift
continue
fi
case $(jn responseStatus web.json) in
200) # OK
break
;;
400) # out of range start
break
;;
403) # suspected terms of service abuse
if jn responseStatus web.json | grep -q 403
then
shift
continue
;;
esac
else
break
fi
done
printf '%s\n' "$px" >&2
printf '%s\n' "$@" > $dt