abulid-keygen: only send help text to stderr on error

This commit is contained in:
Natanael Copa 2022-06-15 09:39:03 +02:00
parent ad5697ac44
commit 11c1091659
1 changed files with 3 additions and 3 deletions

View File

@ -91,7 +91,7 @@ do_keygen() {
}
usage() {
cat >&2 <<-__EOF__
cat <<-__EOF__
$program $program_version - generate signing keys
Usage: $program [-a|--append] [-i|--install] [-n]
Options:
@ -131,12 +131,12 @@ while true; do
-q|--quiet) quiet=1;; # suppresses msg
-h|--help) usage; exit;;
--) shift; break;;
*) exit 1;; # getopt error
*) usage >&2; exit 1;; # getopt error
esac
shift
done
if [ $# -ne 0 ]; then
usage
usage >&2
exit 2
fi