summaryrefslogtreecommitdiffstats
path: root/view-mail
diff options
context:
space:
mode:
Diffstat (limited to 'view-mail')
-rwxr-xr-xview-mail8
1 files changed, 8 insertions, 0 deletions
diff --git a/view-mail b/view-mail
new file mode 100755
index 0000000..4184a42
--- /dev/null
+++ b/view-mail
@@ -0,0 +1,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'"