Update 2025-01-05 11:02 OpenBSD/amd64-t14
This commit is contained in:
parent
87a300f0c4
commit
20f3483f9c
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user