V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m59s

Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
2025-08-26 11:23:33 +02:00
parent fe56c88373
commit a49d173386

View File

@@ -20,9 +20,12 @@ guard_sourcing
# 1: on [set +x] || off [set -x] # 1: on [set +x] || off [set -x]
####################################### #######################################
guard_trace() { guard_trace() {
case "${1,,}" in declare -l var_mode="${1:-}" # Lower-case, default empty.
on) if [[ "${VAR_DEBUG_TRACE}" == "true" ]]; then set +x; fi ;; declare -l var_dbg="${VAR_DEBUG_TRACE-}" # Lower-case, empty if unset.
off) if [[ "${VAR_DEBUG_TRACE}" == "true" ]]; then set -x; fi ;; case "${var_mode}" in
on) [[ "${var_dbg}" == "true" ]] && set +x ;;
off) [[ "${var_dbg}" == "true" ]] && set -x ;;
*) : ;; # No-op on unknown mode.
esac esac
return 0 return 0
} }