Kommentare
This commit is contained in:
parent
212233ef64
commit
b800d97752
3 changed files with 10 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,4 +1,5 @@
|
||||||
all-adblock.txt
|
all-adblock.txt
|
||||||
header.txt
|
header.txt
|
||||||
|
own-rules.txt
|
||||||
.htaccess
|
.htaccess
|
||||||
.htpasswd
|
.htpasswd
|
||||||
|
|
|
@ -1,12 +1,17 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
cd /var/www/DOMAIN/adblocker/
|
cd /var/www/DOMAIN/adblocker/
|
||||||
|
|
||||||
|
#Adblock Listen herunterladen
|
||||||
while read p; do
|
while read p; do
|
||||||
wget -qO - $p >> all-adblock.txt
|
wget -qO - $p >> all-adblock.txt
|
||||||
done <adblocklists.txt
|
done <adblocklists.txt
|
||||||
|
|
||||||
date=$(date '+%a, %d %b %Y %H:%M:%S %z')
|
date=$(date '+%a, %d %b %Y %H:%M:%S %z')
|
||||||
|
|
||||||
|
#Kommentare in den Listen löschen
|
||||||
sed 's/^!.*$//g' all-adblock.txt > allfilters.txt
|
sed 's/^!.*$//g' all-adblock.txt > allfilters.txt
|
||||||
|
|
||||||
|
#Header erstellen
|
||||||
echo '! Title: Mainboarder kompiliert
|
echo '! Title: Mainboarder kompiliert
|
||||||
! Description: Filters optimized for uBlock, for single list use, deduplicated
|
! Description: Filters optimized for uBlock, for single list use, deduplicated
|
||||||
! Expires: 2 days
|
! Expires: 2 days
|
||||||
|
@ -14,6 +19,9 @@ echo '! Title: Mainboarder kompiliert
|
||||||
! Homepage: https://git.mainboarder.de/Public/Adblocker
|
! Homepage: https://git.mainboarder.de/Public/Adblocker
|
||||||
!' > all-adblock.txt
|
!' > 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
|
awk '!seen[$0]++' allfilters.txt >> all-adblock.txt
|
||||||
rm allfilters.txt
|
rm allfilters.txt
|
||||||
|
|
Loading…
Reference in a new issue