fix compressed file name

This commit is contained in:
Pawel Krawczyk 2015-01-09 13:04:33 +00:00
parent 831330ef85
commit ec88385487

View File

@ -78,7 +78,7 @@ for url in $urls; do
# this is required for blocklist.de that sends compressed content if asked for it or not # this is required for blocklist.de that sends compressed content if asked for it or not
if grep -qi 'content-encoding: gzip' "${headers}"; then if grep -qi 'content-encoding: gzip' "${headers}"; then
mv "${unsorted_blocklist}" "${unsorted_blocklist}.gz" mv "${unsorted_blocklist}" "${unsorted_blocklist}.gz"
gzip -d "${unsorted_blocklist}" gzip -d "${unsorted_blocklist}.gz"
fi fi
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}"