]> git.sev.monster Git - dotfiles.git/blame_incremental - bin/pinentry
more gpg stuff
[dotfiles.git] / bin / pinentry
... / ...
CommitLineData
1#!/bin/sh
2# https://kevinlocke.name/bits/2019/07/31/prefer-terminal-for-gpg-pinentry
3
4set -Ce
5graphics="gtk-2 gtk qt x11 gnome"
6tty="curses tty"
7case "${PINENTRY_USER_DATA-}" in
8 *USE_TTY=1*) list="$tty $graphics";;
9 *) list="$graphics $tty";;
10esac
11
12for x in $list; do
13 p=which "pinentry-$x" 2>/dev/null
14 if [ $? = 0 ]; then
15 exec "$p" "$@"
16 fi
17done
18
19echo "No pinentry program found" >&2
This page took 0.027617 seconds and 4 git commands to generate.