#!/usr/bin/env bash case "${PINENTRY_USER_DATA-}" in *USE_TTY=1*) exec pinentry-tty "$@" ;; *) exec /usr/bin/pinentry "$@" ;; esac