summaryrefslogtreecommitdiff
path: root/functions/usage.sh
diff options
context:
space:
mode:
Diffstat (limited to 'functions/usage.sh')
-rwxr-xr-xfunctions/usage.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/functions/usage.sh b/functions/usage.sh
index 19a91c110..388763895 100755
--- a/functions/usage.sh
+++ b/functions/usage.sh
@@ -11,6 +11,10 @@
Usage ()
{
+ if [ -z "${1}" ]; then
+ Echo_error "Usage() requires an exit code"
+ fi
+
echo "${PROGRAM_NAME} - ${DESCRIPTION}"
printf "\nUsage:\n\n"
@@ -25,5 +29,5 @@ Usage ()
echo
echo "Try \"${PROGRAM} --help\" for more information."
- exit 1
+ exit $1
}