Add infos in debug messages

This commit is contained in:
gardouille 2022-12-01 10:40:38 +01:00
parent bdf560fab8
commit 6c44f0ec37
Signed by: gardouille
GPG Key ID: E759BAA22501AF32

View File

@ -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