update-list: Unify var-usage as ${VAR}; Only write unique-zones
This commit is contained in:
parent
8cb50fd264
commit
d5bc929061
1 changed files with 5 additions and 5 deletions
|
@ -18,7 +18,7 @@ update_sources()
|
|||
mkdir -p "/tmp/${BUILDDIR}" && cd "/tmp/${BUILDDIR}" || exit 1
|
||||
cat "${SOURCES}" | while read -r src
|
||||
do
|
||||
curl -#LO "$src"
|
||||
curl -#LO "${src}"
|
||||
done
|
||||
find . -type f | while read -r file
|
||||
do
|
||||
|
@ -30,13 +30,13 @@ format_sources()
|
|||
{
|
||||
cat domains | tr -d '|' | tr -d '^' | grep -v '#' | sed -e 's|0.0.0.0 ||g' | sort -u | uniq > new_domains
|
||||
cat new_domains | while read -r domain
|
||||
blocktype="$(printf '%b' "$TYPE" | sed -e 's|-|_|g')"
|
||||
blocktype="$(printf '%b' "${TYPE}" | sed -e 's|-|_|g')"
|
||||
do
|
||||
if ! [ -z "$domain" ]
|
||||
if ! [ -z "${domain}" ]
|
||||
then
|
||||
printf 'local-zone: "%b" %b\n' "$domain" "$blocktype"
|
||||
printf 'local-zone: "%b" %b\n' "${domain}" "${blocktype}"
|
||||
fi
|
||||
done | tee "${CONF}"
|
||||
done | uniq | tee "${CONF}"
|
||||
}
|
||||
|
||||
trap cleanup QUIT INT TERM EXIT
|
||||
|
|
Loading…
Add table
Reference in a new issue