]> git.sev.monster Git - dotfiles.git/blobdiff - bin/pinentry
install.sh: suppress more link errors, fix l() msg
[dotfiles.git] / bin / pinentry
index 3101bc6d6cbc85813264ae08e8f610611655027b..5a31bd427e05d67d1672911c9d3460e00f19420d 100755 (executable)
@@ -1,9 +1,9 @@
 #!/bin/sh
 # https://kevinlocke.name/bits/2019/07/31/prefer-terminal-for-gpg-pinentry
 
 #!/bin/sh
 # https://kevinlocke.name/bits/2019/07/31/prefer-terminal-for-gpg-pinentry
 
-set -Ce
-gfx="gnome gtk-2 gtk qt x11"
-tty="curses tty"
+set -C
+gfx="qt gnome gtk-4 gtk-3 gtk-2 gtk bemenu dmenu x11"
+tty="curses-ss curses tty"
 case "${PINENTRY_USER_DATA-}" in
        # prefer tty unless USE_TTY is 0
        *USE_TTY=0*) list="$gfx $tty";;
 case "${PINENTRY_USER_DATA-}" in
        # prefer tty unless USE_TTY is 0
        *USE_TTY=0*) list="$gfx $tty";;
@@ -11,10 +11,13 @@ case "${PINENTRY_USER_DATA-}" in
 esac
 
 for x in $list; do
 esac
 
 for x in $list; do
-       p=`which "pinentry-$x"` 2>/dev/null
+       p=$(command -v "pinentry-$x")
        if [ $? = 0 ]; then
                exec "$p" "$@"
        fi
 done
 
        if [ $? = 0 ]; then
                exec "$p" "$@"
        fi
 done
 
+# fallback
+exec pinentry "$@"
+
 echo "No pinentry program found" >&2
 echo "No pinentry program found" >&2
This page took 0.028935 seconds and 4 git commands to generate.