Add support for comments and blank lines in adlists.default/adlists.list
This commit is contained in:
parent
4a1e88f4bf
commit
bffc77e478
10
gravity.sh
10
gravity.sh
|
@ -100,7 +100,12 @@ function gravity_collapse() {
|
|||
echo -n "::: Custom adList file detected. Reading..."
|
||||
sources=()
|
||||
while read -a line; do
|
||||
#Do not read commented out or blank lines
|
||||
if [[ $line = \#* ]] || [[ ! $line ]]; then
|
||||
echo "" > /dev/null
|
||||
else
|
||||
sources+=($line)
|
||||
fi
|
||||
done < $adListFile
|
||||
echo " done!"
|
||||
else
|
||||
|
@ -108,7 +113,12 @@ function gravity_collapse() {
|
|||
echo -n "::: No custom adlist file detected, reading from default file..."
|
||||
sources=()
|
||||
while read -a line; do
|
||||
#Do not read commented out or blank lines
|
||||
if [[ $line = \#* ]] || [[ ! $line ]]; then
|
||||
echo "" > /dev/null
|
||||
else
|
||||
sources+=($line)
|
||||
fi
|
||||
done < $adListDefault
|
||||
echo " done!"
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue