@@ -7,9 +7,9 @@ function print_help() { echo 'download-api-client [--platform ] [--tcl-version ]' echo ' [--kitcreator-version ] [--kitdll]' echo ' [--threaded] [--debug] [--dynamictk]' - echo ' [--staticpkgs]' + echo ' [--staticpkgs] [--verbose]' echo 'download-api-client {--help|--platforms|--tcl-versions|' echo ' --kitcreator-versions|--packages}' } @@ -19,8 +19,9 @@ nextArg='' kit_filename='' options=() +internalOptionsVerbose='false' for arg in "$@"; do if [ -n "${nextArg}" ]; then jsonArgs["${nextArg}"]="${arg}" nextArg='' @@ -27,8 +28,11 @@ continue fi case "${arg}" in + --verbose) + internalOptionsVerbose='true' + ;; --platform|--tcl-version|--kitcreator-version) nextArg="${arg:2}" nextArg="${nextArg//-/_}" ;; @@ -112,10 +116,12 @@ echo " ${status}" fi if [ "${status}" != "complete" ]; then - echo "failed: ${status}" >&2 - curl -sSL "${build_log_url}" >&2 + echo "${status}: Build terminated in error" >&2 + if [ "${internalOptionsVerbose}" = 'true' ]; then + curl -sSL "${build_log_url}" >&2 + fi exit 1 fi