This commit is contained in:
MrSecure 2018-01-12 11:43:25 +00:00 committed by GitHub
commit 9e53fd91c6
2 changed files with 33 additions and 2 deletions

View file

@ -9,7 +9,6 @@
# ------------------------------------------------------------------------------
# Load dependencies
. ./output_lib.sh
. ./helper_lib.sh
# Setup the paths
@ -35,6 +34,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
}
@ -42,15 +42,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