From e4ce9e111123ee4555a1afc1782c75a2c2ba9a09 Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Thu, 9 Mar 2023 17:04:06 +0100 Subject: [PATCH] chore: make possible to debug format-changelog.sh --- scripts/rel/cut.sh | 4 +--- scripts/rel/format-changelog.sh | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/rel/cut.sh b/scripts/rel/cut.sh index ed94dc466..728aeddb3 100755 --- a/scripts/rel/cut.sh +++ b/scripts/rel/cut.sh @@ -4,9 +4,7 @@ set -euo pipefail -if [ "${DEBUG:-}" = 1 ]; then - set -x -fi +[ "${DEBUG:-}" = 1 ] && set -x # ensure dir cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")/../.." diff --git a/scripts/rel/format-changelog.sh b/scripts/rel/format-changelog.sh index 3561ad55c..b1992d5bb 100755 --- a/scripts/rel/format-changelog.sh +++ b/scripts/rel/format-changelog.sh @@ -3,6 +3,8 @@ set -euo pipefail shopt -s nullglob export LANG=C.UTF-8 +[ "${DEBUG:-}" = 1 ] && set -x + logerr() { echo "$(tput setaf 1)ERROR: $1$(tput sgr0)" 1>&2 }