X-Git-Url: https://git.madduck.net/etc/mutt.git/blobdiff_plain/8937bb7554dbcfad9face59b9d9b5c4368fcff6e..5ff3e521154fb1eb6e3302ac39562e865574359d:/.mutt/bgrun?ds=inline diff --git a/.mutt/bgrun b/.mutt/bgrun index d4278b2..56c26e5 100755 --- a/.mutt/bgrun +++ b/.mutt/bgrun @@ -9,7 +9,14 @@ elif [ -d "${TMPDIR}/volatile" ]; then fi export TMPDIR TMPDIR=$(mktemp -dp "$TMPDIR" mutt.XXXXXXXXXX) -cleanup() { cd / && notify_output && rm -rf "$TMPDIR"; } + +cleanup() { + cd / + echo Cleaning up $TMPDIR… >> $TMPDIR/output.stderr + notify_output + rm -rf "$TMPDIR" + trap - 1 2 3 4 5 6 7 8 10 11 12 13 14 15 +} trap cleanup 1 2 3 4 5 6 7 8 10 11 12 13 14 15 cd "$TMPDIR" @@ -100,5 +107,6 @@ case "$SELF" in echo Cleaning up $TMPDIR… > $TMPDIR/output.stderr cleanup ) & + trap - 1 2 3 4 5 6 7 8 10 11 12 13 14 15 ;; esac