fixed stdout stuff
This commit is contained in:
parent
71b82de86b
commit
949d80365c
@ -16,7 +16,7 @@
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
|
||||
if ! test -n "$1"; then
|
||||
if test -z "$1"; then
|
||||
printf "Usage: %s [ProtonMail address]\n" "$0" 1>&2
|
||||
exit 64 # syexits(3) EX_USAGE
|
||||
fi
|
||||
@ -34,9 +34,10 @@ done
|
||||
URL="https://api.protonmail.ch/pks/lookup?op=get&search=$1"
|
||||
RESPONSE="$(curl -s "$URL")"
|
||||
|
||||
if ! printf "%s\n" "$RESPONSE"; then
|
||||
if [ "$RESPONSE" = 'No key found' ]; then
|
||||
printf "%s\n" "$RESPONSE" 1>&2
|
||||
exit 76 # sysexits(3) EX_PROTOCOL
|
||||
else
|
||||
printf "%s\n" "$RESPONSE"
|
||||
exit 0
|
||||
fi
|
||||
|
Reference in New Issue
Block a user