mirror of https://github.com/zulip/zulip.git
install-aws-server: Use correct fd and exit code for usage message.
On --help, write to stdout and exits with 0; on error, write to stderr and exit with 1. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
d4190c36be
commit
8a8e538af7
|
@ -29,10 +29,12 @@ image_id=ami-0dc45e3d9be6ab7b5
|
||||||
instance_type=m4.large
|
instance_type=m4.large
|
||||||
ssh_secret_id=prod/git/deploy
|
ssh_secret_id=prod/git/deploy
|
||||||
EOF
|
EOF
|
||||||
exit 1
|
|
||||||
}
|
}
|
||||||
|
|
||||||
args="$(getopt -o '' --long help,branch:,roles:,debug-key: -n "$0" -- "$@")" || usage
|
args="$(getopt -o '' --long help,branch:,roles:,debug-key: -n "$0" -- "$@")" || {
|
||||||
|
usage >&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
eval "set -- $args"
|
eval "set -- $args"
|
||||||
|
|
||||||
BRANCH="main"
|
BRANCH="main"
|
||||||
|
@ -67,7 +69,7 @@ while true; do
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ $# -ne 1 ]; then
|
if [ $# -ne 1 ]; then
|
||||||
usage
|
usage >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue