Don't double check for lines containing no domains in gravity

Signed-off-by: Christian König <ckoenig@posteo.de>
pull/5009/head
Christian König 2 years ago
parent c2bb190dce
commit 4004a93d1a
No known key found for this signature in database

@ -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}"
}

Loading…
Cancel
Save