Best format

This commit is contained in:
Andros Fenollosa 2020-01-04 08:17:41 +01:00
parent 829fb06aae
commit 56e026e617

8
maza
View File

@ -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