Archived
1
0

moved dep check to before argv1 check

This commit is contained in:
Emma Tebibyte 2023-12-24 03:14:08 -07:00
parent 4ddc27cbf2
commit 4ceb6ff073
Signed by: emma
GPG Key ID: 06FA419A1698C270

View File

@ -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")"