Added usage, usage_and_exit, version and error

This commit is contained in:
Gerhard Hoffmann 2022-06-06 18:21:08 +02:00
parent 534d417b86
commit 22fbaded16

View File

@ -28,3 +28,22 @@ exec_process_substitution () {
printf '%s' "$__result" printf '%s' "$__result"
return $__result_code return $__result_code
} }
usage () {
echo "Usage: $PROGRAM [--file config] [--?] [--help] [--version] [--dbg]"
# UpdateController.conf"
}
usage_and_exit () {
usage
exit $1
}
version () {
echo "$PROGRAM version $VERSION"
}
error () {
echo "$@" 1>&2
usage_and_exit 1
}