V8.03.768.2025.06.23
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -18,20 +18,20 @@
|
||||
# $1: $?
|
||||
#######################################
|
||||
trap_on_exit() {
|
||||
declare -r trap_on_exit_code="$1"
|
||||
declare -r var_trap_on_exit_code="$1"
|
||||
trap - EXIT
|
||||
if (( trap_on_exit_code == 0 )); then
|
||||
if (( var_trap_on_exit_code == 0 )); then
|
||||
if "${VAR_EARLY_DEBUG}"; then dump_user_vars; fi
|
||||
clean_up "${trap_on_exit_code}"
|
||||
print_scr_exit "${trap_on_exit_code}"
|
||||
exit 0
|
||||
clean_up "${var_trap_on_exit_code}"
|
||||
print_scr_exit "${var_trap_on_exit_code}"
|
||||
exit "${var_trap_on_exit_code}"
|
||||
else
|
||||
exit "${trap_on_exit_code}"
|
||||
exit "${var_trap_on_exit_code}"
|
||||
fi
|
||||
}
|
||||
|
||||
#######################################
|
||||
# Print Success Message for Trap on 'EXIT' on 'stdout'
|
||||
# Print Success Message for Trap on 'EXIT' on 'stdout'.
|
||||
# Globals:
|
||||
# LOG_DEBUG
|
||||
# LOG_VAR
|
||||
@@ -40,16 +40,16 @@ trap_on_exit() {
|
||||
# VAR_HANDLER_BUILD_DIR
|
||||
# VAR_SCRIPT_SUCCESS
|
||||
# Arguments:
|
||||
# $1: ${trap_on_exit_code} of trap_on_exit()
|
||||
# $1: ${var_trap_on_exit_code} of trap_on_exit()
|
||||
#######################################
|
||||
print_scr_exit() {
|
||||
declare -r print_scr_exit_code="$1"
|
||||
if (( print_scr_exit_code == 0 )); then
|
||||
declare -r var_print_scr_exit_code="$1"
|
||||
if (( var_print_scr_exit_code == 0 )); then
|
||||
if [[ "${VAR_SCRIPT_SUCCESS}" == "true" ]]; then
|
||||
printf "\n"
|
||||
printf "\e[92m✅ CISS.debian.live.builder Script successful. \e[0m\n"
|
||||
printf "\e[92m✅ Aide Initial DB at: %s \e[0m\n" "${VAR_HANDLER_BUILD_DIR}/.integrity/"
|
||||
printf "\e[92m✅ Exited with Status: %s \e[0m\n" "${print_scr_exit_code}"
|
||||
printf "\e[92m✅ Exited with Status: %s \e[0m\n" "${var_print_scr_exit_code}"
|
||||
printf "\n"
|
||||
if [[ "${VAR_EARLY_DEBUG}" == "true" ]]; then
|
||||
printf "\e[92m✅ Script Runtime : %s \e[0m\n" "${SECONDS}"
|
||||
|
||||
Reference in New Issue
Block a user