Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/pi-hole/pi-hole.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian König <ckoenig@posteo.de>2022-11-09 21:10:37 +0300
committerChristian König <ckoenig@posteo.de>2022-11-09 21:10:37 +0300
commit750ad2ae5d31e6f0f828e1b82e7c4a293c2fa1e0 (patch)
tree96f829e3a3ad648a6093a247262ac7e261a4e2d4
parent64e61aac4af3b7b0cd89730a811e9ff89b4d155d (diff)
Don't double check for lines containing no domains in gravityfix_invalid
Signed-off-by: Christian König <ckoenig@posteo.de>
-rwxr-xr-xgravity.sh4
1 files changed, 1 insertions, 3 deletions
diff --git a/gravity.sh b/gravity.sh
index 14732f31..9063e7d8 100755
--- a/gravity.sh
+++ b/gravity.sh
@@ -731,13 +731,11 @@ gravity_ParseFileIntoDomains() {
# 3) Remove comments (text starting with "#", include possible spaces before the hash sign)
# 4) Remove lines containing "/"
# 5) Remove leading tabs, spaces, etc.
- # 6) Delete lines not matching domain names
< "${src}" tr -d '\r' | \
tr '[:upper:]' '[:lower:]' | \
sed 's/\s*#.*//g' | \
sed -r '/(\/).*$/d' | \
- sed -r 's/^.*\s+//g' | \
- sed -r '/([^\.]+\.)+[^\.]{2,}/!d' > "${destination}"
+ sed -r 's/^.*\s+//g' > "${destination}"
chmod 644 "${destination}"
}