Add infos in debug messages
This commit is contained in:
parent
bdf560fab8
commit
6c44f0ec37
|
@ -42,7 +42,6 @@ OPTIONS :
|
|||
|
||||
-h,--help
|
||||
Print this help message.
|
||||
|
||||
HELP
|
||||
|
||||
}
|
||||
|
@ -79,11 +78,15 @@ define_vars() { # {{{
|
|||
#fi
|
||||
## }}}
|
||||
|
||||
|
||||
true; ## Remove me
|
||||
}
|
||||
# }}}
|
||||
|
||||
main() { # {{{
|
||||
|
||||
debug_message "--- MAIN BEGIN"
|
||||
|
||||
## If script should not be executed right now {{{
|
||||
### Exit
|
||||
is_script_ok \
|
||||
|
@ -92,7 +95,9 @@ main() { # {{{
|
|||
|
||||
## Define all vars
|
||||
define_vars
|
||||
debug_message "| Define vars"
|
||||
|
||||
debug_message "--- MAIN END"
|
||||
}
|
||||
# }}}
|
||||
|
||||
|
@ -120,6 +125,7 @@ if [ ! "${NBARGS}" -eq "0" ]; then
|
|||
case "${1}" in
|
||||
-d|--debug ) ## debug
|
||||
DEBUG=0
|
||||
debug_message "--- Manage argument BEGIN"
|
||||
;;
|
||||
-h|--help ) ## help
|
||||
usage
|
||||
|
@ -140,8 +146,7 @@ if [ ! "${NBARGS}" -eq "0" ]; then
|
|||
;;
|
||||
esac
|
||||
|
||||
debug_message "Arguments management − \
|
||||
${RED}${1}${COLOR_DEBUG} option managed."
|
||||
debug_message "| ${RED}${1}${COLOR_DEBUG} option managed."
|
||||
|
||||
## Move to the next argument
|
||||
shift
|
||||
|
@ -149,13 +154,12 @@ ${RED}${1}${COLOR_DEBUG} option managed."
|
|||
|
||||
done
|
||||
|
||||
debug_message "Arguments management − \
|
||||
${RED}${manage_arg}${COLOR_DEBUG} argument(s) successfully managed."
|
||||
debug_message "| ${RED}${manage_arg}${COLOR_DEBUG} argument(s) successfully managed."
|
||||
else
|
||||
debug_message "Arguments management − \
|
||||
No arguments/options to manage."
|
||||
debug_message "| No arguments/options to manage."
|
||||
fi
|
||||
|
||||
debug_message "--- Manage argument END"
|
||||
# }}}
|
||||
|
||||
main
|
||||
|
|
Loading…
Reference in New Issue