Wrap gpg snippet to ensure that the command is available

master
nirenjan 2020-09-09 07:49:26 -07:00
parent 9da5e26220
commit a866ab7d4e
1 changed files with 11 additions and 8 deletions

View File

@ -1,3 +1,5 @@
if command -v gpgconf >/dev/null
then
gpgconf --launch gpg-agent
export SSH_AUTH_SOCK="$HOME/.gnupg/S.gpg-agent.ssh"
@ -8,3 +10,4 @@ then
export SSH_AUTH_SOCK="$TSOCK"
unset TSOCK
fi
fi