The Blacklist: Blocking Malicious domains using Bash
We're missing a shebang line.  The question is tagged bash, but that seems overkill, since there's nothing here that's not standard POSIX shell.
#!/bin/sh

We append to the_blacklist.temp.txt, but don't ensure that it starts off empty, or that it's even writeable.  It's best to create temporary files using mktemp:
tmpfile=mktemp || exit $?
trap &quot;rm $tmpfile&quot; EXIT

Also, instead of directing final output to the_blacklist.txt, it would be more flexible to write to standard output, and let the user choose where to send it (perhaps pipe into another filter).
But there seems to be no reason to use a file here - just pipe the for loop directly into awk (or into sort -u - that may be a better choice if you're memory-constrained, as it will perform an external merge-sort if it needs to).
The duplicated sed pipe could be replaced with a single sed program of two commands:
for
    …
done |
    sed -e 's/\r//g' -e 's/^/0.0.0.0 /' | gawk '!a[$0]++'

There's a security issue here:

                    gawk &quot;$rule&quot; | \


We are executing downloaded content in awk.  Because we can't be sure that the adblock.sources URL cannot be replaced with a more harmful version, we should run awk in its constrained &quot;sandbox&quot; mode, and use the -- separator so we don't interpret the script as arguments.
                    gawk --sandbox -- &quot;$rule&quot; | \


These changes give me
#!/bin/sh

set -eu

sources=$(mktemp)
trap 'rm &quot;$sources&quot;' EXIT

curl -s -o &quot;$sources&quot; https://raw.githubusercontent.com/T145/packages/master/net/adblock/files/adblock.sources

for key in $(jq -r 'keys[]' &quot;$sources&quot;)
do
    case $key in
        gaming | osid_basic )
        # Ignore these lists
        ;;
        * )
            url=$(jq -r &quot;.$key.url&quot; &quot;$sources&quot;)
            rule=$(jq -r &quot;.$key.rule&quot; &quot;$sources&quot;)

            curl -s &quot;$url&quot; |
                case $url in
                    *.tar.gz) tar -xOzf - ;;
                    *) cat ;;
                esac |
                gawk --sandbox -- &quot;$rule&quot;
    esac
done |
    sed -e 's/\r//g' -e 's/^/0.0.0.0 /' | sort -u

Somebody more expert with jq could probably avoid the remaining temporary file by making a single pass over the retrieved data.