mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-01-19 00:32:34 +01:00
show logging option when user asks for help
* avoid printf to simplify usage() syntax * add reminder to update usage() when CLI option is added * preserve indentation for help output Signed-off-by: Paul Morgan <jumanjiman@gmail.com>
This commit is contained in:
parent
ed6b0fa348
commit
aaffcb8df1
1 changed files with 7 additions and 3 deletions
|
@ -35,10 +35,12 @@ if [ $? -ne 0 ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
usage () {
|
usage () {
|
||||||
printf "
|
cat <<EOF
|
||||||
usage: %s [options]
|
usage: ${myname} [options]
|
||||||
|
|
||||||
-h optional Print this help message\n" "$myname"
|
-h optional Print this help message
|
||||||
|
-l PATH optional Log output in PATH
|
||||||
|
EOF
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,6 +64,8 @@ if [ "x$ID" != "x0" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Get the flags
|
# Get the flags
|
||||||
|
# If you add an option here, please
|
||||||
|
# remember to update usage() above.
|
||||||
while getopts hl: args
|
while getopts hl: args
|
||||||
do
|
do
|
||||||
case $args in
|
case $args in
|
||||||
|
|
Loading…
Reference in a new issue