23 lines
584 B
Plaintext
23 lines
584 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
case $PINENTRY_USER_DATA in
|
||
|
tty)
|
||
|
exec pinentry-curses "$@"
|
||
|
;;
|
||
|
*)
|
||
|
if ! test -x ~/.config/pinentry; then
|
||
|
for i in pinentry-kwallet pinentry-qt pinentry-gnome3 pinentry-gtk-2 pinentry-emacs pinentry-dmenu pinentry-curses pinentry-tty; do
|
||
|
if command -v "${i}" > /dev/null; then
|
||
|
echo "#!/bin/sh" > ~/.config/pinentry
|
||
|
echo "${i} \${@}" >> ~/.config/pinentry
|
||
|
chmod +x ~/.config/pinentry
|
||
|
break
|
||
|
fi
|
||
|
done
|
||
|
fi
|
||
|
|
||
|
exec ~/.config/pinentry "$@"
|
||
|
;;
|
||
|
esac
|
||
|
|