From c4aad564c7a8e661fc0c3bcc76f744caa41077b8 Mon Sep 17 00:00:00 2001 From: Gerd Aschemann Date: Tue, 13 Aug 2024 13:20:32 +0200 Subject: [PATCH] WIP 332 Bump DTCW/DTC --- dtcw | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/dtcw b/dtcw index be8f544d..55308abb 100755 --- a/dtcw +++ b/dtcw @@ -12,7 +12,7 @@ set -o pipefail # See https://github.com/docToolchain/docToolchain/releases for available versions. # Set DTC_VERSION to "latest" to get the latest, yet unreleased version. -: "${DTC_VERSION:=3.3.1}" +: "${DTC_VERSION:=3.4.0}" # if not set, public docker hub is used : "${DTC_DOCKER_PREFIX:=}" @@ -25,7 +25,7 @@ set -o pipefail # export DTC_TEMPLATE1=https://....zip # export DTC_TEMPLATE2=https://....zip -# docToolchain configurtion file may be overruled by the user +# docToolchain configuration file may be overruled by the user : "${DTC_CONFIG_FILE:=docToolchainConfig.groovy}" # Contains the current project git branch, "-" if not available @@ -85,7 +85,7 @@ main() { install_component_and_exit "${environment}" "${2-}" elif [ "${1}" = "getJava" ]; then # TODO: remove getJava in the next major release - echo "Warning: 'getJava' is deprecated and and will be removed. Use './dtcw install java' instead." + echo "Warning: 'getJava' is deprecated and will be removed. Use './dtcw install java' instead." install_component_and_exit "${environment}" "java" fi @@ -129,7 +129,9 @@ main() { fi # echo "Command to invoke: ${command}" - exec ${emu} ${bash} -c "${command}" + # shellcheck disable=SC2086 + # as we hope to know what we are doing here ;-) + exec ${emu} ${bash} ${DTC_SHELL_DEBUG:-} -c "${command}" } assert_argument_exists() { @@ -148,8 +150,8 @@ usage() { cat </dev/null 2>&1; then - cmd="doctoolchain . ${*} ${DTC_OPTS}" + elif command -v doctoolchain >/dev/null 2>&1; then + cmd="doctoolchain" else - cmd="${DTC_HOME}/bin/doctoolchain . ${*} ${DTC_OPTS}" + echo "Could not find doctoolchain executable, neither in '${DTC_HOME}' nor on PATH ('${PATH}')" >&2 + exit 1 fi + cmd="${cmd} . ${*} ${DTC_OPTS}" else cmd="$(sdk_home_doctoolchain "${version}")/bin/doctoolchain . ${*} ${DTC_OPTS}" fi