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