mirror of
https://github.com/docker/docker-bench-security.git
synced 2024-11-01 08:31:44 +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
|
||||
|
||||
usage () {
|
||||
printf "
|
||||
usage: %s [options]
|
||||
cat <<EOF
|
||||
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
|
||||
}
|
||||
|
||||
|
@ -62,6 +64,8 @@ if [ "x$ID" != "x0" ]; then
|
|||
fi
|
||||
|
||||
# Get the flags
|
||||
# If you add an option here, please
|
||||
# remember to update usage() above.
|
||||
while getopts hl: args
|
||||
do
|
||||
case $args in
|
||||
|
|
Loading…
Reference in a new issue