summaryrefslogtreecommitdiffstats
path: root/.gnupg/pinentry-wrapper
blob: 229ad94e85fd85bb040ef44f7e60b22f49447012 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
# TAKEN FROM https://unix.stackexchange.com/a/236747/135796
# choose pinentry depending on PINENTRY_USER_DATA
# requires pinentry-curses and pinentry-tty
# this *only works* with gpg 2
# see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=802020
# Fixes the pinentry-tty error https://github.com/neomutt/neomutt/issues/1014

case $PINENTRY_USER_DATA in
	curses)
		exec /usr/local/bin/pinentry-curses "$@"
		;;
	*)
		exec /usr/local/bin/pinentry-tty "$@"
		;;
esac