From bc18d5341c09bb3e5c122b0e447bb134ce62d81e Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Sat, 19 Jan 2019 22:02:19 -0500 Subject: [PATCH] Make help and usage setup standards-compliant --- build | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build b/build index f50311d0a2..9047dd816b 100755 --- a/build +++ b/build @@ -32,7 +32,13 @@ usage() { echo -e "Build output files are collected at '../jellyfin-build/'." } +# Show usage on stderr with exit 1 on argless if [[ -z $1 ]]; then + usage >&2 + exit 1 +fi +# Show usage if -h or --help are specified in the args +if [[ $@ =~ '-h' || $@ =~ '--help' ]]; then usage exit 0 fi