Replace elaborate wget with git repo

This commit is contained in:
Dan Church 2021-02-13 10:31:09 -06:00
parent d1edd1d520
commit c03f0c8d37
Signed by: h3xx
GPG Key ID: EA2BF379CD2CDBD0
5 changed files with 7 additions and 5 deletions

1
.gitignore vendored
View File

@ -1,2 +1 @@
/lists/StevenBlack-all.hosts
block.list

4
.gitmodules vendored Normal file
View File

@ -0,0 +1,4 @@
[submodule "repos/StevenBlack-hosts"]
path = repos/StevenBlack-hosts
url = https://github.com/StevenBlack/hosts.git
branch = master

@ -0,0 +1 @@
Subproject commit df10691d81f5709fb71f5ac334d67e08a4b87443

View File

@ -6,10 +6,6 @@ LIST_DIR=$WORKDIR/lists
OUT=()
URL=()
# StevenBlack comprehensive host list (all)
OUT+=("$LIST_DIR/StevenBlack-all.hosts")
URL+=('https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts')
# Individual hosts lists in that collection
#OUT+=("$LIST_DIR/sb-Badd-Boyz-Hosts.hosts")
#URL+=('https://raw.githubusercontent.com/StevenBlack/hosts/master/data/Badd-Boyz-Hosts/hosts')

View File

@ -14,6 +14,8 @@ cleanup() {
}
trap 'cleanup' EXIT
(cd "$WORKDIR" && git submodule update --init --remote)
for (( I = 0 ; I < ${#OUT[@]} ; ++I )); do
MY_URL=${URL[$I]}
MY_OUT=${OUT[$I]}