diff options
author | Luke Smith <luke@lukesmith.xyz> | 2019-02-19 08:14:03 -0500 |
---|---|---|
committer | Luke Smith <luke@lukesmith.xyz> | 2019-02-19 08:14:03 -0500 |
commit | 6d5f14112e2ed8d4050e253a9e82e44b9bc195b3 (patch) | |
tree | 3b224b9b4fa1cc5842547e963b92f32081f9fc28 /credentials | |
parent | a42bd50f4a426872887355c5abff196ad68d2ad9 (diff) |
getmuttpass detects gpg variety
Diffstat (limited to 'credentials')
-rwxr-xr-x | credentials/getmuttpass | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/credentials/getmuttpass b/credentials/getmuttpass index ee25584..1359114 100755 --- a/credentials/getmuttpass +++ b/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\"" |