From 7a9663781ddbd463af99b2ebdba71aab23a7abed Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Tue, 9 Jan 2024 08:47:18 +0100 Subject: [PATCH] add automatic trace mode if TRACE=1 --- client/lib/main.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/lib/main.sh b/client/lib/main.sh index d84c159..2fcae8f 100644 --- a/client/lib/main.sh +++ b/client/lib/main.sh @@ -12,6 +12,10 @@ set -o nounset # The pipeline's return status is the value of the last (rightmost) command # to exit with a non-zero status, or zero if all commands exit successfully. set -o pipefail +# Enable trace mode if called with environment variable TRACE=1 +if [[ "${TRACE-0}" == "1" ]]; then + set -o xtrace +fi source "${LIBDIR}/utilities.sh" source "${LIBDIR}/dump-mysql.sh"