abuild-sign: send help text to stderr on error

This commit is contained in:
Natanael Copa 2022-06-15 12:17:46 +02:00
parent 97d6a8567d
commit 32d080e427

View File

@ -52,7 +52,7 @@ do_sign() {
}
usage() {
cat >&2 <<-__EOF__
cat <<-__EOF__
$program $program_version - sign indexes
Usage: $program [-k PRIVKEY] [-p PUBKEY] INDEXFILE...
$program -e
@ -74,7 +74,7 @@ quiet=
args=$(getopt -o ek:p:qh --long installed,private:,public:,quiet,help -n "$program" -- "$@")
if [ $? -ne 0 ]; then
usage
usage >&2
exit 2
fi
eval set -- "$args"
@ -91,7 +91,7 @@ while true; do
shift
done
if [ $# -eq 0 ] && ! $check_installed; then
usage
usage >&2
exit 2
fi