From 37a5283b5d1a84363e490c9853596d2a2437df03 Mon Sep 17 00:00:00 2001
From: Pawel Krawczyk
Date: Wed, 7 Jan 2015 10:58:42 +0000
Subject: [PATCH] OpenWRT curl doesn't support --compressed
---
blacklist.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/blacklist.sh b/blacklist.sh
index efc98a1..8af3182 100755
--- a/blacklist.sh
+++ b/blacklist.sh
@@ -29,7 +29,9 @@ if [ "$(which uci)" ]; then
IN_OPT="-i $wan_iface"
INPUT=input_rule
FORWARD=forwarding_rule
+ COMPRESS_OPT=""
else
+ COMPRESS_OPT="--compressed"
INPUT=INPUT
FORWARD=FORWARD
fi
@@ -68,7 +70,7 @@ for url in $urls; do
# download the blocklist
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}"
# calculate performance parameters for the new set