added wrapper for pinentry on unix and osx

This commit is contained in:
Steffen Vogel 2015-08-01 23:04:23 +02:00
parent 9c01f3e3a3
commit ba5e6b644b
2 changed files with 11 additions and 2 deletions

View file

@ -1,5 +1,5 @@
pinentry-program /usr/local/MacGPG2/libexec/pinentry-mac.app/Contents/MacOS/pinentry-mac
write-env-file /Users/stv0g/.gpg-agent-info
pinentry-program ${HOME}/.homesick/repos/dotfiles/pinentry.sh
write-env-file
enable-ssh-support
default-cache-ttl 600
max-cache-ttl 7200

9
pinentry.sh Executable file
View file

@ -0,0 +1,9 @@
#!/bin/sh
if [ -x /usr/local/MacGPG2/libexec/pinentry-mac.app/Contents/MacOS/pinentry-mac ]; then
export PINENTRY_BINARY="/usr/local/MacGPG2/libexec/pinentry-mac.app/Contents/MacOS/pinentry-mac"
else
export PINENTRY_BINARY="/usr/bin/pinentry"
fi
exec $PINENTRY_BINARY "$@"