mybin

my ~/bin
git clone https://a3nm.net/git/mybin/
Log | Files | Refs | README

my-pinentry (370B)


      1 #!/bin/bash
      2 # choose pinentry depending on PINENTRY_USER_DATA
      3 # requires pinentry-curses and pinentry-gtk2
      4 # this *only works* with gpg 2
      5 # see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=802020
      6 
      7 case $PINENTRY_USER_DATA in
      8 gtk)
      9   exec /usr/bin/pinentry-gtk-2 "$@"
     10   ;;
     11 none)
     12   exit 1 # do not ask for passphrase
     13   ;;
     14 *)
     15   exec /usr/bin/pinentry-curses "$@"
     16 esac
     17