@ -151,8 +151,7 @@ gravity_transport() {
gravity_spinup( ) {
echo ":::"
# Loop through domain list. Download each one and remove commented lines (lines beginning with '# 'or '/') and # blank lines
for ( ( i = 0; i < " ${# sources [@] } " ; i++) )
do
for ( ( i = 0; i < " ${# sources [@] } " ; i++) ) ; do
url = ${ sources [ $i ] }
# Get just the domain from the URL
domain = $( echo " $url " | cut -d'/' -f3)
@ -190,8 +189,7 @@ gravity_Schwarzchild() {
# Find all active domains and compile them into one file and remove CRs
echo -n "::: Aggregating list of domains..."
truncate -s 0 ${ piholeDir } /${ matterAndLight }
for i in " ${ activeDomains [@] } "
do
for i in " ${ activeDomains [@] } " ; do
cat " $i " | tr -d '\r' >> ${ piholeDir } /${ matterAndLight }
done
echo " done!"
@ -214,8 +212,7 @@ gravity_Whitelist() {
echo -n " ::: Adding ${# sources [@] } adlist source ${ plural } to the whitelist... "
urls = ( )
for url in " ${ sources [@] } "
do
for url in " ${ sources [@] } " ; do
tmp = $( echo " $url " | awk -F '/' '{print $3}' )
urls = ( " ${ urls [@] } " ${ tmp } )
done
@ -266,8 +263,7 @@ gravity_hostFormat() {
# blackbody - remove any remnant files from script processes
gravity_blackbody( ) {
# Loop through list files
for file in ${ piholeDir } /*.${ justDomainsExtension }
do
for file in ${ piholeDir } /*.${ justDomainsExtension } ; do
# If list is in active array then leave it (noop) else rm the list
if [ [ " ${ activeDomains [@] } " = ~ ${ file } ] ] ; then
:
@ -333,8 +329,7 @@ gravity_reload() {
}
for var in " $@ "
do
for var in " $@ " ; do
case " $var " in
"-f" | "--force" ) forceGrav = true; ;
"-h" | "--help" ) helpFunc; ;