From 5ff3e521154fb1eb6e3302ac39562e865574359d Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Wed, 31 Jul 2019 10:11:21 +1200 Subject: [PATCH] bgrun: fixup cleaning up --- .mutt/bgrun | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 -- 2.39.5