Bash clear tmp files (for script) on exit (trap)

TMP="$(mktemp -d)"
trap 'rm -rf -- "$TMP"' EXIT