summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2019-10-08 15:50:05 +0200
committerFlorian Pritz <bluewind@xinu.at>2019-10-08 15:50:05 +0200
commit9f29c085eb20f65bc494520e42c7aac5d5f782c8 (patch)
tree3bb04d05a612998dc9a1a1662fdfa569b688d48a
parenta3892f42e640aac9abf571f789fbb344f7c49628 (diff)
downloadbin-9f29c085eb20f65bc494520e42c7aac5d5f782c8.tar.gz
bin-9f29c085eb20f65bc494520e42c7aac5d5f782c8.tar.xz
Add new scripts
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rwxr-xr-xgpg-diff.sh3
-rwxr-xr-xview-mail8
2 files changed, 11 insertions, 0 deletions
diff --git a/gpg-diff.sh b/gpg-diff.sh
new file mode 100755
index 0000000..7045e46
--- /dev/null
+++ b/gpg-diff.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+vimdiff <(gpg -d "$1") <(gpg -d "$2")
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'"