From: martin f. krafft Date: Tue, 30 Jul 2019 22:11:21 +0000 (+1200) Subject: bgrun: fixup cleaning up X-Git-Url: https://git.madduck.net/etc/mutt.git/commitdiff_plain/5ff3e521154fb1eb6e3302ac39562e865574359d?ds=sidebyside bgrun: fixup cleaning up --- 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