V8.00.000.2025.06.17
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -16,7 +16,7 @@ guard_sourcing
|
||||
# Wrapper for XTRACE Debug.
|
||||
# Globals:
|
||||
# BASH_XTRACEFD
|
||||
# LOG_TRACE
|
||||
# LOG_TRC
|
||||
# PS4
|
||||
# SHELLOPTS
|
||||
# Arguments:
|
||||
@@ -26,11 +26,11 @@ debug_trace() {
|
||||
### Set a verbose PS4 prompt including timestamp, source, line, exit status of previous command, and function name
|
||||
declare -grx PS4='\e[97m+\e[0m\e[96m$(date -u +%Y-%m-%dT%H:%M:%S.%4N%z)\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 LOG_TRACE="/tmp/ciss_debian_installer_$$_trace.log"
|
||||
### Generates empty LOG_TRACE
|
||||
touch "${LOG_TRACE}" && chmod 0600 "${LOG_TRACE}"
|
||||
declare -grx LOG_TRC="${DIR_LOG}/ciss_debian_installer_$$_trace.log"
|
||||
### Generates empty LOG_TRC
|
||||
touch "${LOG_TRC}" && chmod 0600 "${LOG_TRC}"
|
||||
### Open file descriptor 42 for writing to the debug log
|
||||
exec 42>| "${LOG_TRACE}"
|
||||
exec 42>| "${LOG_TRC}"
|
||||
### Write Debug Log Header https://www.gnu.org/software/bash/manual/html_node/Bash-Variables
|
||||
debug_header "$#" "$*"
|
||||
### Tell Bash to send xtrace output to FD 42
|
||||
|
||||
Reference in New Issue
Block a user