Skip to content

Commit

Permalink
getmuttpass detects gpg variety
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeSmithxyz committed Feb 19, 2019
1 parent a42bd50 commit 6d5f141
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions credentials/getmuttpass
@@ -1,5 +1,5 @@
#!/bin/bash
pass=$(gpg2 --decrypt --quiet ~/.config/mutt/credentials/$1.gpg)
pass=$(printf '%q' $pass)
echo set smtp_pass=\"$pass\"
echo set imap_pass=\"$pass\"
GPG="gpg"; command -v gpg >/dev/null || GPG="gpg2"
pass=$(printf '%q' "$("$GPG" --decrypt --quiet ~/.config/mutt/credentials/$1.gpg)")
echo "set smtp_pass=\"$pass\""
echo "set imap_pass=\"$pass\""

0 comments on commit 6d5f141

Please sign in to comment.