improve download script and install it aas surf-adblock-dl - surf-adblock - Surf adblock web extension
 (HTM) git clone git://git.codemadness.org/surf-adblock
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit bce9b1e6b8d516ab21f9e23839ae96f82a9cd723
 (DIR) parent 2b4dbc8301f9bc4f3ee3ea807563de705af22c13
 (HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
       Date:   Sat, 16 Jul 2016 12:05:05 +0200
       
       improve download script and install it aas surf-adblock-dl
       
       usage: surf-adblock-dl > ~/.surf/adblockrules
       
       Diffstat:
         M Makefile                            |       6 ++++++
         D dl.sh                               |      20 --------------------
         A surf-adblock-dl                     |      20 ++++++++++++++++++++
       
       3 files changed, 26 insertions(+), 20 deletions(-)
       ---
 (DIR) diff --git a/Makefile b/Makefile
       @@ -23,13 +23,19 @@ clean:
                rm -rf surf-adblock.la .libs ${OBJ} ${OBJ:.lo=.o}
        
        install: all surf-adblock.la
       +        mkdir -p ${DESTDIR}${PREFIX}/bin
       +        cp -f surf-adblock-dl ${DESTDIR}${PREFIX}/bin
       +        chmod 755 ${DESTDIR}${PREFIX}/bin/surf-adblock-dl
       +
                mkdir -p ${DESTDIR}${LIBPREFIX}
                ${LIBTOOL} --mode install install -c surf-adblock.la \
                        ${DESTDIR}${LIBPREFIX}/surf-adblock.la
        
        uninstall:
       +        rm -f ${DESTDIR}${PREFIX}/bin/surf-adblock-dl
                ${LIBTOOL} --mode uninstall rm -f \
                        ${DESTDIR}${LIBPREFIX}/surf-adblock.la
                rm -df ${DESTDIR}${LIBPREFIX} || true
       +        rm -df ${DESTDIR}${PREFIX}/bin || true
        
        .PHONY: all clean install uninstall
 (DIR) diff --git a/dl.sh b/dl.sh
       @@ -1,20 +0,0 @@
       -#!/bin/sh
       -# download adblock lists
       -
       -set -e
       -
       -(while read -r l; do
       -        curl -L "$l"
       -        echo "" # not all lists have line at EOF.
       -done <<!
       -https://easylist.github.io/easylist/easylist.txt
       -https://easylist.github.io/easylist/easyprivacy.txt
       -https://easylist-downloads.adblockplus.org/antiadblockfilters.txt
       -https://easylist-downloads.adblockplus.org/easylistdutch.txt
       -https://easylist.github.io/easylistgermany/easylistgermany.txt
       -https://easylist-downloads.adblockplus.org/liste_fr.txt
       -https://easylist.github.io/easylist/fanboy-annoyance.txt
       -https://easylist.github.io/easylist/fanboy-social.txt
       -!
       -) | awk '{if(!x[$0]++){print $0;}}' > list
       -# remove duplicate lines but keep the order.
 (DIR) diff --git a/surf-adblock-dl b/surf-adblock-dl
       @@ -0,0 +1,20 @@
       +#!/bin/sh
       +# download adblock lists
       +
       +set -x -e
       +
       +(while read -r l; do
       +        curl -L "$l"
       +        echo "" # not all lists have line at EOF.
       +done <<!
       +https://easylist.github.io/easylist/easylist.txt
       +https://easylist.github.io/easylist/easyprivacy.txt
       +https://easylist-downloads.adblockplus.org/antiadblockfilters.txt
       +https://easylist-downloads.adblockplus.org/easylistdutch.txt
       +https://easylist.github.io/easylistgermany/easylistgermany.txt
       +https://easylist-downloads.adblockplus.org/liste_fr.txt
       +https://easylist.github.io/easylist/fanboy-annoyance.txt
       +https://easylist.github.io/easylist/fanboy-social.txt
       +!
       +) | awk '!x[$0]++'
       +# remove duplicate lines but keep the order.