From b800d977524e69344cabfe3a5d869f4855691519 Mon Sep 17 00:00:00 2001 From: Robin Kloppe Date: Mon, 24 Jul 2023 23:03:45 +0200 Subject: [PATCH] Kommentare --- .gitignore | 1 + create-adblock.sh | 10 +++++++++- header.txt.template => own-rules.txt.template | 0 3 files changed, 10 insertions(+), 1 deletion(-) rename header.txt.template => own-rules.txt.template (100%) diff --git a/.gitignore b/.gitignore index 25f7b63..88c5893 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ all-adblock.txt header.txt +own-rules.txt .htaccess .htpasswd diff --git a/create-adblock.sh b/create-adblock.sh index ed46f5a..2246024 100755 --- a/create-adblock.sh +++ b/create-adblock.sh @@ -1,12 +1,17 @@ #!/bin/bash cd /var/www/DOMAIN/adblocker/ +#Adblock Listen herunterladen while read p; do wget -qO - $p >> all-adblock.txt done allfilters.txt + +#Header erstellen echo '! Title: Mainboarder kompiliert ! Description: Filters optimized for uBlock, for single list use, deduplicated ! Expires: 2 days @@ -14,6 +19,9 @@ echo '! Title: Mainboarder kompiliert ! Homepage: https://git.mainboarder.de/Public/Adblocker !' > all-adblock.txt -cat header.txt >> all-adblock.txt +#Eigene Regeln hinzufügen +cat own-rules.txt >> all-adblock.txt + +#Duplikate entfernen awk '!seen[$0]++' allfilters.txt >> all-adblock.txt rm allfilters.txt diff --git a/header.txt.template b/own-rules.txt.template similarity index 100% rename from header.txt.template rename to own-rules.txt.template