From f4d81a5244d1f22a1a9943d030dbad9ad9780ac9 Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Oct 06 2013 02:49:05 +0000 Subject: Update tcar_printMessage.sh file. - Previously, --as-debugger-line option was set after the TCAR_FLAG_QUIET verification. This made the --debug option to print nothing when run with the --quiet option in the same command. The intention of --quiet option is to reduce the output information when processing source files but not debugging information. This update changes the tcar_printMessage.sh file to move up the --as-debugger-line option definition so the TCAR_FLAG_QUIET verification doesn't affect it. - Remove --as-suggestion-line option definition. This option is not used inside the centos-art.sh script. - Remove --as-inkscape-line option definition. This option is not used inside the centos-art.sh script. --- diff --git a/Automation/Scripts/tcar_printMessage.sh b/Automation/Scripts/tcar_printMessage.sh index b7e2ba9..c281e1f 100755 --- a/Automation/Scripts/tcar_printMessage.sh +++ b/Automation/Scripts/tcar_printMessage.sh @@ -87,6 +87,14 @@ function tcar_printMessage { exit 1 ;; + --as-debugger-line ) + if [[ ${TCAR_FLAG_DEBUG} == 'true' ]];then + tcar_printMessage "${MESSAGE}" --as-stdout-line + else + return + fi + ;; + --as-tree-line ) local NAME local -a FN @@ -109,21 +117,6 @@ function tcar_printMessage { done ;; - --as-suggestion-line ) - - # Build the error message. - tcar_printMessage "${TCAR_SCRIPT_COMMAND} ($(tcar_printCaller 1)):" --as-stderr-line - tcar_printMessage "`gettext "The path provided cannot be processed the way you entered it."`" --as-stderr-line - tcar_printMessage "`gettext "Instead, try the following equivalence:"` ${MESSAGE}" --as-stderr-line - tcar_printMessage "${TCAR_MODULE_NAME}" --as-toknowmore-line - - # Finish script execution with exit status 1 (SIGHUP) to - # imply the script finished because an error. We are - # using this as convention to finish the script execution. - # So, don't remove the following line, please. - exit 1 - ;; - --as-toknowmore-line ) tcar_printMessage "`gettext "To know more, run"` ${TCAR_SCRIPT_COMMAND} ${MESSAGE} --help" --as-stderr-line ;; @@ -191,8 +184,8 @@ function tcar_printMessage { esac - # Verify verbose option. The verbose option controls whether - # messages are printed or not. + # Verify quiet option. The quiet option controls whether messages + # are printed or not. if [[ "${TCAR_FLAG_QUIET}" == 'true' ]];then return fi @@ -214,13 +207,6 @@ function tcar_printMessage { echo "${MESSAGE}" 1>&2 ;; - --as-debugger-line ) - if [[ ${TCAR_FLAG_DEBUG} != 'true' ]];then - return - fi - tcar_printMessage "${MESSAGE}" --as-stdout-line - ;; - --as-banner-line ) tcar_printMessage '-' --as-separator-line tcar_printMessage "${MESSAGE}" --as-stdout-line @@ -303,10 +289,6 @@ function tcar_printMessage { tcar_printMessage "`gettext "Palette"`: ${MESSAGE}" --as-stdout-line ;; - --as-inkscape-line ) - tcar_printMessage "${MESSAGE}" --as-stdout-line - ;; - esac }