From 66bb0e7bb3173d462ddcb9193f408e8123568a9b Mon Sep 17 00:00:00 2001 From: rmceoin Date: Mon, 22 Jun 2015 13:03:15 -0700 Subject: [PATCH 1/2] Strip carriage returns on matter so that whitelists work correctly. Lines that had \r would not match. --- gravity.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gravity.sh b/gravity.sh index 11b4a21..834a60c 100755 --- a/gravity.sh +++ b/gravity.sh @@ -77,7 +77,7 @@ done # Find all files with the .domains extension and compile them into one file echo "** Aggregating list of domains..." -find $origin/ -type f -name "*.$justDomainsExtension" -exec cat {} \; > $origin/$matter +find $origin/ -type f -name "*.$justDomainsExtension" -exec cat {} \; | tr -d '\r' > $origin/$matter # Append blacklist entries if they exist if [[ -f $blacklist ]];then From 552f980430aa89ece656d7c3fda3e355410e65e6 Mon Sep 17 00:00:00 2001 From: rmceoin Date: Mon, 22 Jun 2015 13:33:02 -0700 Subject: [PATCH 2/2] blacklist was being concatenated with wrong matter --- gravity.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gravity.sh b/gravity.sh index 834a60c..4734991 100755 --- a/gravity.sh +++ b/gravity.sh @@ -83,7 +83,7 @@ find $origin/ -type f -name "*.$justDomainsExtension" -exec cat {} \; | tr -d '\ if [[ -f $blacklist ]];then numberOf=$(cat $blacklist | wc -l | sed 's/^[ \t]*//') echo "** Blacklisting $numberOf domain(s)..." - cat $blacklist >> /tmp/matter.txt + cat $blacklist >> $origin/$matter else : fi