OpenWRT curl doesn't support --compressed

This commit is contained in:
Pawel Krawczyk 2015-01-07 10:58:42 +00:00
parent 660d661551
commit 37a5283b5d

View File

@ -29,7 +29,9 @@ if [ "$(which uci)" ]; then
IN_OPT="-i $wan_iface" IN_OPT="-i $wan_iface"
INPUT=input_rule INPUT=input_rule
FORWARD=forwarding_rule FORWARD=forwarding_rule
COMPRESS_OPT=""
else else
COMPRESS_OPT="--compressed"
INPUT=INPUT INPUT=INPUT
FORWARD=FORWARD FORWARD=FORWARD
fi fi
@ -68,7 +70,7 @@ for url in $urls; do
# download the blocklist # download the blocklist
set_name=$(basename $url) set_name=$(basename $url)
curl -s --compressed -k "$url" >"${unsorted_blocklist}" curl -s ${COMPRESS_OPT} -k "$url" >"${unsorted_blocklist}"
sort -u <"${unsorted_blocklist}" | egrep "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$" >"${sorted_blocklist}" sort -u <"${unsorted_blocklist}" | egrep "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$" >"${sorted_blocklist}"
# calculate performance parameters for the new set # calculate performance parameters for the new set