Fixed incorrect passing of duplicates

This commit is contained in:
VibroAxe 2018-11-29 10:36:11 +00:00
parent 00619cf6d2
commit 0a980bd03c

View file

@ -17,13 +17,9 @@ echo " default \$http_host;" >> $outputfile
key=$(jq -r ".cache_domains[$entry].name" cache_domains.json) key=$(jq -r ".cache_domains[$entry].name" cache_domains.json)
jq -r ".cache_domains[$entry].domain_files | to_entries[] | .key" cache_domains.json | while read fileid; do jq -r ".cache_domains[$entry].domain_files | to_entries[] | .key" cache_domains.json | while read fileid; do
jq -r ".cache_domains[$entry].domain_files[$fileid]" cache_domains.json | while read filename; do jq -r ".cache_domains[$entry].domain_files[$fileid]" cache_domains.json | while read filename; do
echo "" >> $outputfile
cat ${filename} | while read fileentry; do cat ${filename} | while read fileentry; do
# Ignore comments echo $fileentry
case "$var" in if grep -q "^$fileentry" $outputfile; then
\#*) continue ;;
esac
if grep -q "$fileentry" $outputfile; then
continue continue
fi fi
echo " ${fileentry} ${key};" >> $outputfile echo " ${fileentry} ${key};" >> $outputfile