V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m59s
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:
@@ -20,9 +20,12 @@ guard_sourcing
|
||||
# 1: on [set +x] || off [set -x]
|
||||
#######################################
|
||||
guard_trace() {
|
||||
case "${1,,}" in
|
||||
on) if [[ "${VAR_DEBUG_TRACE}" == "true" ]]; then set +x; fi ;;
|
||||
off) if [[ "${VAR_DEBUG_TRACE}" == "true" ]]; then set -x; fi ;;
|
||||
declare -l var_mode="${1:-}" # Lower-case, default empty.
|
||||
declare -l var_dbg="${VAR_DEBUG_TRACE-}" # Lower-case, empty if unset.
|
||||
case "${var_mode}" in
|
||||
on) [[ "${var_dbg}" == "true" ]] && set +x ;;
|
||||
off) [[ "${var_dbg}" == "true" ]] && set -x ;;
|
||||
*) : ;; # No-op on unknown mode.
|
||||
esac
|
||||
return 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user