From 20f3483f9c49de395d188cd81d62e9102bc67449 Mon Sep 17 00:00:00 2001 From: c0dev0id Date: Sun, 5 Jan 2025 11:02:20 +0100 Subject: [PATCH] Update 2025-01-05 11:02 OpenBSD/amd64-t14 --- .bin/update-adlist | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.bin/update-adlist b/.bin/update-adlist index cda65e5..c65d5ba 100755 --- a/.bin/update-adlist +++ b/.bin/update-adlist @@ -2,7 +2,7 @@ trap _restore_all 1 2 3 6 -_list=${1:-/etc/unwind/blocklistproject.txt} +_list=/etc/unwind/blocklistproject.txt _url=https://blocklistproject.github.io/Lists/alt-version _dir=/etc/unwind/lists @@ -41,6 +41,7 @@ _download() { doas ftp -V -o "$_dir/$_file" "$_url/$_file" > /dev/null \ && doas rm -f "$_dir/$_file.old" } + _disabled() { if echo "$1" | grep -q "^#" then @@ -51,11 +52,15 @@ _disabled() { fi return 1 } + _assemble() { echo "Assemble blocklist: /etc/unwind/_assembled.txt" cat $_dir/*.txt \ | tr -d " " \ | grep -v '^#' \ + | grep -v '^-' \ + | grep -v '^$' \ + | cut -d "#" -f1 \ | doas sort -uo /etc/unwind/_assembled.txt } _restart_unwind() {