summaryrefslogtreecommitdiff
path: root/bin/getmuttpass
diff options
context:
space:
mode:
Diffstat (limited to 'bin/getmuttpass')
-rwxr-xr-xbin/getmuttpass5
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/getmuttpass b/bin/getmuttpass
new file mode 100755
index 0000000..15a1d55
--- /dev/null
+++ b/bin/getmuttpass
@@ -0,0 +1,5 @@
+#!/bin/bash
+GPG="gpg"; command -v gpg >/dev/null || GPG="gpg2"
+pass=$(printf '%q' "$("$GPG" --decrypt --quiet ~/.local/share/muttwizard/$1.gpg)")
+echo "set smtp_pass=\"$pass\""
+echo "set imap_pass=\"$pass\""