mirror of
https://github.com/tanrax/maza-ad-blocking.git
synced 2024-11-22 07:05:41 +01:00
Best format
This commit is contained in:
parent
829fb06aae
commit
56e026e617
8
maza
8
maza
@ -52,16 +52,10 @@ update() {
|
|||||||
rm -f $CONFIG/$LIST
|
rm -f $CONFIG/$LIST
|
||||||
mkdir -p $CONFIG
|
mkdir -p $CONFIG
|
||||||
# Download DNS list
|
# Download DNS list
|
||||||
curl -L -s "https://pgl.yoyo.org/adservers/serverlist.php?showintro=0;hostformat=hosts" -o "$CONFIG/$LIST"
|
curl -L -s "https://pgl.yoyo.org/adservers/serverlist.php?showintro=0&mimetype=plaintext" -o "$CONFIG/$LIST"
|
||||||
# Clear list
|
# Clear list
|
||||||
## Get PRE tag
|
|
||||||
sed -i .bak -n "/<pre>/,/<\/pre>/p" "$CONFIG/$LIST"
|
|
||||||
## Remove comments
|
## Remove comments
|
||||||
sed -i .bak '/^#/ d' "$CONFIG/$LIST"
|
sed -i .bak '/^#/ d' "$CONFIG/$LIST"
|
||||||
## Remove first line
|
|
||||||
sed -i .bak '1d' "$CONFIG/$LIST"
|
|
||||||
## Remove last line
|
|
||||||
sed -i .bak '$ d' "$CONFIG/$LIST"
|
|
||||||
## Add start tag DNS list in first line
|
## Add start tag DNS list in first line
|
||||||
sed -i .bak "1i\\
|
sed -i .bak "1i\\
|
||||||
$AUTHOR
|
$AUTHOR
|
||||||
|
Loading…
Reference in New Issue
Block a user