Kommentare

This commit is contained in:
Robin Kloppe 2023-07-24 23:03:45 +02:00
parent 212233ef64
commit b800d97752
3 changed files with 10 additions and 1 deletions

1
.gitignore vendored
View file

@ -1,4 +1,5 @@
all-adblock.txt
header.txt
own-rules.txt
.htaccess
.htpasswd

View file

@ -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 <adblocklists.txt
date=$(date '+%a, %d %b %Y %H:%M:%S %z')
#Kommentare in den Listen löschen
sed 's/^!.*$//g' all-adblock.txt > 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