V8.02.644.2025.05.31
All checks were successful
Retrieve the DNSSEC status at the time of updating the repository. / build-dnssec-diagram (push) Successful in 30s
All checks were successful
Retrieve the DNSSEC status at the time of updating the repository. / build-dnssec-diagram (push) Successful in 30s
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -13,12 +13,13 @@
|
||||
#######################################
|
||||
# Debugger Wrapper for xtrace to Debug Log
|
||||
# Globals:
|
||||
# BASH_SOURCE
|
||||
# BASH_XTRACEFD
|
||||
# DEBUG_LOG
|
||||
# EARLY_DEBUG
|
||||
# LOG_DEBUG
|
||||
# PS4
|
||||
# SHELLOPTS
|
||||
# dump_vars_initial
|
||||
# VAR_DUMP_VARS_INITIAL
|
||||
# VAR_EARLY_DEBUG
|
||||
# var
|
||||
# Arguments:
|
||||
# None
|
||||
@@ -26,22 +27,22 @@
|
||||
debugger() {
|
||||
### Capture an initial snapshot of all variables (excluding '^(BASH|_).*')
|
||||
# shellcheck disable=SC2155
|
||||
declare -grx dump_vars_initial=$(mktemp)
|
||||
declare -grx VAR_DUMP_VARS_INITIAL=$(mktemp)
|
||||
{
|
||||
declare var
|
||||
while IFS= read -r var; do
|
||||
declare -p "${var}" 2>/dev/null
|
||||
done < <(compgen -v | grep -Ev '^(BASH|_).*')
|
||||
} | sort >| "${dump_vars_initial}"
|
||||
declare -grx EARLY_DEBUG=true
|
||||
} | sort >| "${VAR_DUMP_VARS_INITIAL}"
|
||||
declare -grx VAR_EARLY_DEBUG=true
|
||||
### Set a verbose PS4 prompt including timestamp, source, line, exit status, and function name
|
||||
declare -grx PS4='\e[97m+\e[0m\e[96m$(date +%T.%4N)\e[0m\e[97m:\e[0m\e[92m[${BASH_SOURCE[0]}:${LINENO}]\e[0m\e[97m|\e[0m\e[93m${?}\e[0m\e[97m>\e[0m\e[95m${FUNCNAME[0]:-main}()\e[0m \e[97m>>\e[0m '
|
||||
# shellcheck disable=SC2155
|
||||
declare -grx DEBUG_LOG="/tmp/ciss_live_builder_$$_debug.log"
|
||||
### Generates empty DEBUG_LOG
|
||||
touch "${DEBUG_LOG}" && chmod 0600 "${DEBUG_LOG}"
|
||||
declare -grx LOG_DEBUG="/tmp/ciss_live_builder_$$_debug.log"
|
||||
### Generates empty LOG_DEBUG
|
||||
touch "${LOG_DEBUG}" && chmod 0600 "${LOG_DEBUG}"
|
||||
### Open file descriptor 42 for writing to the debug log
|
||||
exec 42>| "${DEBUG_LOG}"
|
||||
exec 42>| "${LOG_DEBUG}"
|
||||
### Write Debug Log Header https://www.gnu.org/software/bash/manual/html_node/Bash-Variables
|
||||
### Determine the directory of this script, even if sourced.
|
||||
# shellcheck disable=SC2155
|
||||
|
||||
Reference in New Issue
Block a user