From c440e011eb46bfaaaf24688ded1f68e154f6a5ea Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Jan 17 2014 14:53:56 +0000 Subject: Update tcar_printMessage function. - Previously, when error messages are printed, tcar_printMessage printed the path string of tcar.sh script inside the repository not the path string of the file executed. This update changes the tcar_printMessage function to use the path string related to file being executed (e.g., ${0}) instead of the path related to tcar.sh script inside the repository. There might be situations in which both the path of the file being executed and the path related to tcar.sh script inside the repository do print the same path information (e.g., you are executing the tcar.sh script using no command but its absolute path). --- diff --git a/Scripts/tcar_printMessage.sh b/Scripts/tcar_printMessage.sh index cb075b7..a129eb7 100755 --- a/Scripts/tcar_printMessage.sh +++ b/Scripts/tcar_printMessage.sh @@ -108,7 +108,7 @@ function tcar_printMessage { local COUNT=$(( ${#FN[*]} - 2 )) local SEPARATOR='`--' local SPACES=0 - echo "${TCAR_SCRIPT_BASEDIR}/${TCAR_SCRIPT_NAME}" 1>&2 + echo "${0}" 1>&2 while [[ ${COUNT} -gt 0 ]];do if [[ ${COUNT} -eq $(( ${#FN[*]} - 2 )) ]];then echo ${SEPARATOR} ${FN[${COUNT}]} 1>&2