From c03f0c8d37f5e2887a5e234d29d66d8e0f8cd357 Mon Sep 17 00:00:00 2001 From: Dan Church Date: Sat, 13 Feb 2021 10:31:09 -0600 Subject: [PATCH] Replace elaborate wget with git repo --- .gitignore | 1 - .gitmodules | 4 ++++ repos/StevenBlack-hosts | 1 + update.cfg | 4 ---- update.sh | 2 ++ 5 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 .gitmodules create mode 160000 repos/StevenBlack-hosts diff --git a/.gitignore b/.gitignore index 032ba38..9894668 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -/lists/StevenBlack-all.hosts block.list diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..df3a046 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "repos/StevenBlack-hosts"] + path = repos/StevenBlack-hosts + url = https://github.com/StevenBlack/hosts.git + branch = master diff --git a/repos/StevenBlack-hosts b/repos/StevenBlack-hosts new file mode 160000 index 0000000..df10691 --- /dev/null +++ b/repos/StevenBlack-hosts @@ -0,0 +1 @@ +Subproject commit df10691d81f5709fb71f5ac334d67e08a4b87443 diff --git a/update.cfg b/update.cfg index 3d2704f..fbd3bc8 100644 --- a/update.cfg +++ b/update.cfg @@ -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') diff --git a/update.sh b/update.sh index 9fed703..f52e021 100755 --- a/update.sh +++ b/update.sh @@ -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]}