moved dep check to before argv1 check
This commit is contained in:
parent
4ddc27cbf2
commit
4ceb6ff073
10
protonkey
10
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")"
|
||||
|
Reference in New Issue
Block a user