tmpdir="$(mktemp -d)" trap 'rm -rf "$tmpdir"' EXIT curl -fsSL "$URL" -o "$tmpdir/input.tar.gz" tar -xzf "$tmpdir/input.tar.gz" -C "$tmpdir"