Update 2025-01-05 11:02 OpenBSD/amd64-t14

This commit is contained in:
c0dev0id 2025-01-05 11:02:20 +01:00
parent 87a300f0c4
commit 20f3483f9c

View File

@ -2,7 +2,7 @@
trap _restore_all 1 2 3 6 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 _url=https://blocklistproject.github.io/Lists/alt-version
_dir=/etc/unwind/lists _dir=/etc/unwind/lists
@ -41,6 +41,7 @@ _download() {
doas ftp -V -o "$_dir/$_file" "$_url/$_file" > /dev/null \ doas ftp -V -o "$_dir/$_file" "$_url/$_file" > /dev/null \
&& doas rm -f "$_dir/$_file.old" && doas rm -f "$_dir/$_file.old"
} }
_disabled() { _disabled() {
if echo "$1" | grep -q "^#" if echo "$1" | grep -q "^#"
then then
@ -51,11 +52,15 @@ _disabled() {
fi fi
return 1 return 1
} }
_assemble() { _assemble() {
echo "Assemble blocklist: /etc/unwind/_assembled.txt" echo "Assemble blocklist: /etc/unwind/_assembled.txt"
cat $_dir/*.txt \ cat $_dir/*.txt \
| tr -d " " \ | tr -d " " \
| grep -v '^#' \ | grep -v '^#' \
| grep -v '^-' \
| grep -v '^$' \
| cut -d "#" -f1 \
| doas sort -uo /etc/unwind/_assembled.txt | doas sort -uo /etc/unwind/_assembled.txt
} }
_restart_unwind() { _restart_unwind() {