1 2 3 4 5 6 7 8
#!/bin/bash TMPDIR="$(mktemp -d "/tmp/${0##*/}.XXXXXX")" trap "rm -rf '${TMPDIR}'" EXIT TERM mkdir "$TMPDIR/"{cur,new} cp "$1" "$TMPDIR/cur" termite -e "mutt -R -f '$TMPDIR'"