aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/scripts/my-pinentry
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2019-09-05 07:48:16 +0200
committerneodarz <neodarz@neodarz.net>2019-09-05 07:48:16 +0200
commit9b19480228d8421c3987a634a602012c953a993e (patch)
tree4bce21766502f3a72bb2002daeea2a406c2a3bda /dotfiles/scripts/my-pinentry
parent40dddc15f4a323d3c84c84be7bb2c5ca94d3c07c (diff)
downloaddotfiles_dotdrop-9b19480228d8421c3987a634a602012c953a993e.tar.xz
dotfiles_dotdrop-9b19480228d8421c3987a634a602012c953a993e.zip
Add some scripts
Diffstat (limited to 'dotfiles/scripts/my-pinentry')
-rwxr-xr-xdotfiles/scripts/my-pinentry16
1 files changed, 16 insertions, 0 deletions
diff --git a/dotfiles/scripts/my-pinentry b/dotfiles/scripts/my-pinentry
new file mode 100755
index 0000000..b46687e
--- /dev/null
+++ b/dotfiles/scripts/my-pinentry
@@ -0,0 +1,16 @@
+#!/bin/bash
+# choose pinentry depending on PINENTRY_USER_DATA
+# requires pinentry-curses and pinentry-gtk2
+# this *only works* with gpg 2
+# see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=802020
+
+case $PINENTRY_USER_DATA in
+gtk)
+ exec /usr/bin/pinentry-gtk-2 "$@"
+ ;;
+none)
+ exit 1 # do not ask for passphrase
+ ;;
+*)
+ exec /usr/bin/pinentry-curses "$@"
+esac