diff --git a/gnupg2.sh b/gnupg2.sh index 485ab8b..fce8fc6 100644 --- a/gnupg2.sh +++ b/gnupg2.sh @@ -1,3 +1,3 @@ -if [[ $- == *i* ]]; then - export GPG_TTY=$(tty) -fi +case "$-" in *i*) + export GPG_TTY=$(tty) ;; +esac