$ head -n-0 ~/bin/firefox-tmp-profile #!/bin/sh # Workaround for missing feature: # https://bugzilla.mozilla.org/show_bug.cgi?id=1604376 set -e dir="$(mktemp --tmpdir --directory firefox-tmp-profile-XXXXXXXX)" cleanup () { rm --recursive --force "$dir"; } trap cleanup EXIT firefox -no-remote -profile "$dir" "$@" || true