File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -8,9 +8,10 @@ rm -f host adblocker dnsmasq.conf smartdns.conf domain clash allow
88
99# Merge allowlist
1010echo " Merge allow..."
11- for url in ` cat allowlist` ; do
11+ while read -r url; do
12+ [[ -z " $url " || " $url " =~ ^# ]] && continue # Skip empty lines and comments
1213 wget --no-check-certificate -t 1 -T 10 -q -O - " $url " >> tmpallow
13- done
14+ done < allowlist
1415
1516sed -i -e ' /#/d' \
1617 -e ' /^$/d' \
@@ -25,9 +26,10 @@ rm -f tmpallow
2526
2627# Merge blocklist
2728echo " Merge block..."
28- for url in ` cat blocklist` ; do
29+ while read -r url; do
30+ [[ -z " $url " || " $url " =~ ^# ]] && continue # Skip empty lines and comments
2931 wget --no-check-certificate -t 1 -T 10 -q -O - " $url " >> tmpblock
30- done
32+ done < blocklist
3133
3234sed -i -e ' /#/d' \
3335 -e ' /@/d' \
You can’t perform that action at this time.
0 commit comments