diff --git a/protonkey b/protonkey index 401253b..898af09 100755 --- a/protonkey +++ b/protonkey @@ -19,16 +19,16 @@ argv0="$0" -if test -z "$1"; then - printf "Usage: %s [ProtonMail address...]\n" "$argv0" 1>&2 - exit 64 # syexits(3) EX_USAGE -fi - if ! command -v curl > /dev/null; then printf "%s: Missing dependency: curl(1)\n" "$0" 1>&2 exit 69 # sysexits(3) EX_UNAVAILABLE fi +if test -z "$1"; then + printf "Usage: %s [ProtonMail address...]\n" "$argv0" 1>&2 + exit 64 # syexits(3) EX_USAGE +fi + while test -n "$1"; do URL="https://api.protonmail.ch/pks/lookup?op=get&search=$1" RESPONSE="$(curl -s "$URL")"