Fix duplicate check - too unspecific

The check is too unspecific, it currently allows partial line matches.

This prevents broader entries to be added after more specific ones.

Example: after lancache.steamcontent.com is added, steamcontent.com will be wrongfully skipped.

This change will make sure only exact duplicates are skipped.
This commit is contained in:
arnili 2020-02-21 13:06:25 +01:00 committed by GitHub
parent dceb6beb3f
commit 8f9ee10ae7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,7 +52,7 @@ while read entry; do
continue
fi
parsed=$(echo $fileentry | sed -e "s/^\*\.//")
if grep -q "$parsed" $outputfile; then
if grep -qx "$parsed" $outputfile; then
continue
fi
echo " local-zone: \"${parsed}\" redirect" >> $outputfile