mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-10-08 16:30:18 +00:00
add option -m to disable colors in output
Signed-off-by: Mr. Secure <ben.github@mrsecure.org>
This commit is contained in:
parent
5bf3e2894c
commit
94adb3eca9
2 changed files with 33 additions and 2 deletions
|
@ -11,7 +11,6 @@
|
|||
# ------------------------------------------------------------------------------
|
||||
|
||||
# Load dependencies
|
||||
. ./output_lib.sh
|
||||
. ./helper_lib.sh
|
||||
|
||||
# Setup the paths
|
||||
|
@ -38,6 +37,7 @@ usage () {
|
|||
usage: ${myname} [options]
|
||||
|
||||
-h optional Print this help message
|
||||
-m optional Disable colors in output
|
||||
-l PATH optional Log output in PATH
|
||||
EOF
|
||||
}
|
||||
|
@ -45,15 +45,20 @@ EOF
|
|||
# Get the flags
|
||||
# If you add an option here, please
|
||||
# remember to update usage() above.
|
||||
while getopts hl: args
|
||||
outputlib='output_lib.sh'
|
||||
|
||||
while getopts hml: args
|
||||
do
|
||||
case $args in
|
||||
h) usage; exit 0 ;;
|
||||
m) outputlib='textout_lib.sh' ;;
|
||||
l) logger="$OPTARG" ;;
|
||||
*) usage; exit 1 ;;
|
||||
esac
|
||||
done
|
||||
|
||||
. ./${outputlib}
|
||||
|
||||
if [ -z "$logger" ]; then
|
||||
logger="${myname}.log"
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue