summaryrefslogtreecommitdiff
path: root/dots/home/scripts/pinentry.sh
diff options
context:
space:
mode:
Diffstat (limited to 'dots/home/scripts/pinentry.sh')
-rwxr-xr-xdots/home/scripts/pinentry.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/dots/home/scripts/pinentry.sh b/dots/home/scripts/pinentry.sh
new file mode 100755
index 0000000..f02ee6f
--- /dev/null
+++ b/dots/home/scripts/pinentry.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+source log.sh "pinentry.sh"
+
+#-- <gpg> --
+bin="${HOMEBREW_PREFIX:-"/usr"}/bin"
+case "$PINENTRY_USER_DATA" in
+ *USE_TTY*) pe=$bin/pinentry-tty ;;
+ *USE_CURSES*) pe=$bin/pinentry-curses ;;
+ *USE_QT*) pe=$bin/pinentry-qt ;;
+ *USE_MAC*) pe=$bin/pinentry-mac ;;
+ *USE_GTK2*) pe=$bin/pinentry-gtk-2 ;;
+ *USE_GNOME3*) pe=$bin/pinentry-gnome3 ;;
+ *USE_X11*) pe=$bin/pinentry-x11 ;;
+esac
+
+log DEBUG "$pe"
+
+exec $pe "$@"
+#-- </gpg> --