From eee226c78e54f55fe8a32b0263b239793b38af81 Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Mar 23 2011 19:39:06 +0000 Subject: Stop using $(caller) to build the AsToKnowMoreLine of cli_printMessage function. Instead, start using the FUNCDIRNAM variable to retrive the function directory name where the cli_printMessage function was called from. This way we always redirect users to read the function documentation the error was triggered from. --- diff --git a/Scripts/Functions/About/about_getActions.sh b/Scripts/Functions/About/about_getActions.sh index 15d714b..8008605 100755 --- a/Scripts/Functions/About/about_getActions.sh +++ b/Scripts/Functions/About/about_getActions.sh @@ -71,7 +71,7 @@ function about_getActions { less $ACTIONVAL else cli_printMessage "`gettext "A valid action is required."`" 'AsErrorLine' - cli_printMessage "$(caller)" 'AsToKnowMoreLine' + cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' fi } diff --git a/Scripts/Functions/Help/help.sh b/Scripts/Functions/Help/help.sh index 6f17e68..c75a05f 100755 --- a/Scripts/Functions/Help/help.sh +++ b/Scripts/Functions/Help/help.sh @@ -119,7 +119,7 @@ function help { eval $ACTIONNAM else cli_printMessage "`gettext "A valid action is required."`" 'AsErrorLine' - cli_printMessage "$(caller)" 'AsToKnowMoreLine' + cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' fi # Commit changes from working copy to central repository only. diff --git a/Scripts/Functions/Help/help_deleteEntry.sh b/Scripts/Functions/Help/help_deleteEntry.sh index ba5e0b8..08de10a 100755 --- a/Scripts/Functions/Help/help_deleteEntry.sh +++ b/Scripts/Functions/Help/help_deleteEntry.sh @@ -71,7 +71,7 @@ function help_deleteEntry { # the working copy again. svn del ${ENTRIES} --quiet if [[ $? -ne 0 ]];then - cli_printMessage "$(caller)" 'AsToKnowMoreLine' + cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' fi # Print separator line. diff --git a/Scripts/Functions/Help/help_searchIndex.sh b/Scripts/Functions/Help/help_searchIndex.sh index e20715a..6ad7559 100644 --- a/Scripts/Functions/Help/help_searchIndex.sh +++ b/Scripts/Functions/Help/help_searchIndex.sh @@ -32,7 +32,7 @@ function help_searchIndex { # as default value for index-search. if [[ "$FLAG_FILTER" == '.+' ]];then cli_printMessage "`gettext "Use the \\\`--filter' option to define the search pattern."`" 'AsErrorLine' - cli_printMessage "$(caller)" 'AsToKnowMoreLine' + cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' fi # Print action message. diff --git a/Scripts/Functions/Html/html_getActions.sh b/Scripts/Functions/Html/html_getActions.sh index 6cd746d..6978bbc 100755 --- a/Scripts/Functions/Html/html_getActions.sh +++ b/Scripts/Functions/Html/html_getActions.sh @@ -74,7 +74,7 @@ function html_getActions { eval $ACTIONNAM else cli_printMessage "`gettext "A valid action is required."`" 'AsErrorLine' - cli_printMessage "$(caller)" 'AsToKnowMoreLine' + cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' fi # Syncronize changes between the working copy and the central diff --git a/Scripts/Functions/Locale/locale.sh b/Scripts/Functions/Locale/locale.sh index a11a080..975115d 100644 --- a/Scripts/Functions/Locale/locale.sh +++ b/Scripts/Functions/Locale/locale.sh @@ -95,7 +95,7 @@ function locale { eval $ACTIONNAM else cli_printMessage "`gettext "A valid action is required."`" 'AsErrorLine' - cli_printMessage "$(caller)" 'AsToKnowMoreLine' + cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' fi # Commit changes from working copy to central repository only. diff --git a/Scripts/Functions/Locale/locale_editMessages.sh b/Scripts/Functions/Locale/locale_editMessages.sh index 88a91a0..d476202 100755 --- a/Scripts/Functions/Locale/locale_editMessages.sh +++ b/Scripts/Functions/Locale/locale_editMessages.sh @@ -35,7 +35,7 @@ function locale_editMessages { FILES=$(cli_getFilesList "${WORKDIR}" ".*/messages\.po") else cli_printMessage "`gettext "The path provided doesn't support localization."`" 'AsErrorLine' - cli_printMessage "$(caller)" 'AsToKnowMoreLine' + cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' fi # Set action preamble. diff --git a/Scripts/Functions/Locale/locale_updateMessageShell.sh b/Scripts/Functions/Locale/locale_updateMessageShell.sh index b1fd359..d79d848 100755 --- a/Scripts/Functions/Locale/locale_updateMessageShell.sh +++ b/Scripts/Functions/Locale/locale_updateMessageShell.sh @@ -41,7 +41,7 @@ function locale_updateMessageShell { FILES=$(cli_getFilesList "$ACTIONVAL" "${FLAG_FILTER}\.sh") else cli_printMessage "`gettext "The path provided can't be processed."`" 'AsErrorLine' - cli_printMessage "$(caller)" 'AsToKnowMoreLine' + cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' fi # Set action preamble. diff --git a/Scripts/Functions/Locale/locale_updateMessageXml.sh b/Scripts/Functions/Locale/locale_updateMessageXml.sh index d2df40f..8489467 100755 --- a/Scripts/Functions/Locale/locale_updateMessageXml.sh +++ b/Scripts/Functions/Locale/locale_updateMessageXml.sh @@ -39,7 +39,7 @@ function locale_updateMessageXml { FILES=$(cli_getFilesList "$ACTIONVAL" "${FLAG_FILTER}\.(svg|xml|docbook)") else cli_printMessage "`gettext "The path provided can't be processed."`" 'AsErrorLine' - cli_printMessage "$(caller)" 'AsToKnowMoreLine' + cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' fi # Set action preamble. diff --git a/Scripts/Functions/Locale/locale_updateMessages.sh b/Scripts/Functions/Locale/locale_updateMessages.sh index 9e8c010..c158d8f 100755 --- a/Scripts/Functions/Locale/locale_updateMessages.sh +++ b/Scripts/Functions/Locale/locale_updateMessages.sh @@ -50,7 +50,7 @@ function locale_updateMessages { else cli_printMessage "`gettext "The path provided doesn't support localization."`" 'AsErrorLine' - cli_printMessage "$(caller)" 'AsToKnowMoreLine' + cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' fi # Execute action name. @@ -58,7 +58,7 @@ function locale_updateMessages { eval $ACTIONNAM else cli_printMessage "`gettext "A valid action is required."`" 'AsErrorLine' - cli_printMessage "$(caller)" 'AsToKnowMoreLine' + cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' fi } diff --git a/Scripts/Functions/Path/path_getActions.sh b/Scripts/Functions/Path/path_getActions.sh index c63f2e2..c0ae8dd 100755 --- a/Scripts/Functions/Path/path_getActions.sh +++ b/Scripts/Functions/Path/path_getActions.sh @@ -107,7 +107,7 @@ function path_getActions { eval $ACTIONNAM else cli_printMessage "`gettext "A valid action is required."`" 'AsErrorLine' - cli_printMessage "$(caller)" 'AsToKnowMoreLine' + cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' fi # Syncronize changes between the working copy and the central diff --git a/Scripts/Functions/Render/render.sh b/Scripts/Functions/Render/render.sh index 959b549..f41e67f 100644 --- a/Scripts/Functions/Render/render.sh +++ b/Scripts/Functions/Render/render.sh @@ -102,7 +102,7 @@ function render { eval $ACTIONNAM else cli_printMessage "`gettext "A valid action is required."`" 'AsErrorLine' - cli_printMessage "$(caller)" 'AsToKnowMoreLine' + cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' fi # Commit changes from working copy to central repository only. diff --git a/Scripts/Functions/Render/render_convertGplToHex.sh b/Scripts/Functions/Render/render_convertGplToHex.sh index 6715ad0..842f91a 100755 --- a/Scripts/Functions/Render/render_convertGplToHex.sh +++ b/Scripts/Functions/Render/render_convertGplToHex.sh @@ -49,7 +49,7 @@ function render_convertGplToHex { # cover Grub and Syslinux images need respectively. if [[ ! $COLOR_NUMBER =~ '^(14|16)$' ]];then cli_printMessage "`eval_gettext "Reducing image to \\\`\\\$COLOR_NUMBER' colors is not supported."`" 'AsErrorLine' - cli_printMessage "$(caller)" 'AsToKnowMoreLine' + cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' fi # Define list of colors from GPL palette. @@ -58,14 +58,14 @@ function render_convertGplToHex { # Verify number of colors returned in the list. if [[ ! $(echo "$COLORS" | wc -l) =~ $COLOR_NUMBER ]];then cli_printMessage "`gettext "The palette doesn't have the correct number of colors."`" 'AsErrorLine' - cli_printMessage "$(caller)" 'AsToKnowMoreLine' + cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' fi # Verify format of colors inside the list. for COLOR in $COLORS;do if [[ ! $COLOR =~ '^[0-9a-f]{6}$' ]];then cli_printMessage "`eval_gettext "The \\\`\\\$COLOR' string isn't a valid color code."`" 'AsErrorLine' - cli_printMessage "$(caller)" 'AsToKnowMoreLine' + cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' fi done diff --git a/Scripts/Functions/Render/render_convertGplToPpm.sh b/Scripts/Functions/Render/render_convertGplToPpm.sh index f8d6ce0..08e23a5 100755 --- a/Scripts/Functions/Render/render_convertGplToPpm.sh +++ b/Scripts/Functions/Render/render_convertGplToPpm.sh @@ -47,7 +47,7 @@ function render_convertGplToPpm { # cover Grub and Syslinux images need respectively. if [[ ! $COLOR_NUMBER =~ '^(14|16)$' ]];then cli_printMessage "`eval_gettext "Reducing image to \\\`\\\$COLOR_NUMBER' colors is not supported."`" 'AsErrorLine' - cli_printMessage "$(caller)" 'AsToKnowMoreLine' + cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' fi # Define list of colors from GPL palette. @@ -56,14 +56,14 @@ function render_convertGplToPpm { # Verify number of colors returned in the list. if [[ ! $(echo "$COLORS" | wc -l) =~ $COLOR_NUMBER ]];then cli_printMessage "`gettext "The palette doesn't have the correct number of colors."`" 'AsErrorLine' - cli_printMessage "$(caller)" 'AsToKnowMoreLine' + cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' fi # Verify format of colors inside the list. for COLOR in $COLORS;do if [[ ! $COLOR =~ '^[0-9a-f]{6}$' ]];then cli_printMessage "`eval_gettext "The \\\`\\\$COLOR' string isn't a valid color code."`" 'AsErrorLine' - cli_printMessage "$(caller)" 'AsToKnowMoreLine' + cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' fi done diff --git a/Scripts/Functions/Render/render_convertHtmlToText.sh b/Scripts/Functions/Render/render_convertHtmlToText.sh index a84adbf..c95198c 100755 --- a/Scripts/Functions/Render/render_convertHtmlToText.sh +++ b/Scripts/Functions/Render/render_convertHtmlToText.sh @@ -61,7 +61,7 @@ function render_convertHtml2Text { else cli_printMessage "`gettext "No way to convert from HTML to plain-text found."`" 'AsErrorLine' - cli_printMessage "$(caller)" 'AsToKnowMoreLine' + cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' fi } diff --git a/Scripts/Functions/Render/render_doBaseActions.sh b/Scripts/Functions/Render/render_doBaseActions.sh index 231cae3..b00c3cc 100755 --- a/Scripts/Functions/Render/render_doBaseActions.sh +++ b/Scripts/Functions/Render/render_doBaseActions.sh @@ -110,7 +110,7 @@ function render_doBaseActions { # Define final location of translation file. TRANSLATION=$(dirname $FILE \ - | sed -r 's!/trunk/(Identity/)!/trunk/Locales/\1!')/$(cli_getCurrentLocale).po + | sed -r 's!/trunk/(Identity/)!/trunk/Locales/\1!')/$(cli_getCurrentLocale)/messages.po # Print final location of translation file. if [[ ! -f "$TRANSLATION" ]];then @@ -216,7 +216,7 @@ function render_doBaseActions { else cli_printMessage "`gettext "The template file you try to render is not supported yet."`" 'AsErrorLine' - cli_printMessage "$(caller)" 'AsToKnowMoreLine' + cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' fi # Remove template instance. diff --git a/Scripts/Functions/Render/render_doDm.sh b/Scripts/Functions/Render/render_doDm.sh index c7edb46..52ea710 100755 --- a/Scripts/Functions/Render/render_doDm.sh +++ b/Scripts/Functions/Render/render_doDm.sh @@ -78,7 +78,7 @@ function render_doDm { # pre-rendition configuration script. if [[ "$RESOLUTIONS" == '' ]];then cli_printMessage "`gettext "There is no resolution information to process."`" 'AsErrorLine' - cli_printMessage $(caller) "AsToKnowMoreLine" + cli_printMessage "${FUNCDIRNAM}" "AsToKnowMoreLine" fi # Define source files using absolute paths. diff --git a/Scripts/Functions/Render/render_doGrub.sh b/Scripts/Functions/Render/render_doGrub.sh index 4d4286e..be957fc 100644 --- a/Scripts/Functions/Render/render_doGrub.sh +++ b/Scripts/Functions/Render/render_doGrub.sh @@ -43,7 +43,7 @@ function render_doGrub { OPTION=$(echo -n $OPTION | cut -d'=' -f1) if [[ "$OPTION" =~ "-(mapfile|verbose)" ]];then cli_printMessage "`eval_gettext "The \\\$OPTION option is already used."`" - cli_printMessage "$(caller)" "AsToKnowMoreLine" + cli_printMessage "${FUNCDIRNAM}" "AsToKnowMoreLine" fi done diff --git a/Scripts/Functions/Render/render_doSyslinux.sh b/Scripts/Functions/Render/render_doSyslinux.sh index 164c77b..670548e 100755 --- a/Scripts/Functions/Render/render_doSyslinux.sh +++ b/Scripts/Functions/Render/render_doSyslinux.sh @@ -90,7 +90,7 @@ function render_doSyslinux { OPTION=$(echo $OPTION | cut -d'=' -f1) if [[ "$OPTION" =~ "-(mapfile|verbose)" ]];then cli_printMessage "`eval_gettext "The \\\$OPTION option is already used."`" - cli_printMessage "$(caller)" "AsToKnowMoreLine" + cli_printMessage "${FUNCDIRNAM}" "AsToKnowMoreLine" fi done diff --git a/Scripts/Functions/Render/render_getArguments.sh b/Scripts/Functions/Render/render_getArguments.sh index 48c975d..37ad20b 100644 --- a/Scripts/Functions/Render/render_getArguments.sh +++ b/Scripts/Functions/Render/render_getArguments.sh @@ -68,7 +68,7 @@ function render_getArguments { FLAG_RELEASEVER="$2" if [[ ! $FLAG_RELEASEVER =~ $(cli_getPathComponent '--release-pattern') ]];then cli_printMessage "`gettext "The release version provided is not supported."`" 'AsErrorLine' - cli_printMessage "$(caller)" 'AsToKnowMoreLine' + cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' fi shift 2 ;; @@ -77,7 +77,7 @@ function render_getArguments { FLAG_BASEARCH="$2" if [[ ! $FLAG_BASEARCH =~ $(cli_getPathComponent '--architecture-pattern') ]];then cli_printMessage "`gettext "The architecture provided is not supported."`" 'AsErrorLine' - cli_printMessage "$(caller)" 'AsToKnowMoreLine' + cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' fi shift 2 ;; diff --git a/Scripts/Functions/Render/render_getConfigOption.sh b/Scripts/Functions/Render/render_getConfigOption.sh index f5cdcd3..fb34c57 100755 --- a/Scripts/Functions/Render/render_getConfigOption.sh +++ b/Scripts/Functions/Render/render_getConfigOption.sh @@ -52,14 +52,14 @@ function render_getConfigOption { # retrive options from. if [[ "$ACTION" == '' ]];then cli_printMessage "`gettext "There is no action to work with."`" - cli_printMessage "$(caller)" 'AsToKnowMoreLine' + cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' fi # Check field value. The field's value must match the cut's # command specification of its -f option. if [[ ! "$FIELD" =~ '^([0-9]+|[0-9]+-|-[0-9]+|[0-9]+-[0-9]+)$' ]];then cli_printMessage "`gettext "The field specified is not valid."`" - cli_printMessage "$(caller)" 'AsToKnowMoreLine' + cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' fi # Get option from pre-rendition configuration action definition. diff --git a/Scripts/Functions/Shell/shell_getActions.sh b/Scripts/Functions/Shell/shell_getActions.sh index 3f50c91..44d75d9 100755 --- a/Scripts/Functions/Shell/shell_getActions.sh +++ b/Scripts/Functions/Shell/shell_getActions.sh @@ -76,7 +76,7 @@ function shell_getActions { eval $ACTIONNAM else cli_printMessage "`gettext "A valid action is required."`" 'AsErrorLine' - cli_printMessage "$(caller)" 'AsToKnowMoreLine' + cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' fi # Syncronize changes between the working copy and the central diff --git a/Scripts/Functions/Svg/svg_getActions.sh b/Scripts/Functions/Svg/svg_getActions.sh index bca9556..479377c 100755 --- a/Scripts/Functions/Svg/svg_getActions.sh +++ b/Scripts/Functions/Svg/svg_getActions.sh @@ -88,7 +88,7 @@ function svg_getActions { eval $ACTIONNAM else cli_printMessage "`gettext "A valid action is required."`" 'AsErrorLine' - cli_printMessage "$(caller)" 'AsToKnowMoreLine' + cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' fi # Syncronize changes between the working copy and the central diff --git a/Scripts/Functions/cli_checkFiles.sh b/Scripts/Functions/cli_checkFiles.sh index 88c8bff..f374ce2 100644 --- a/Scripts/Functions/cli_checkFiles.sh +++ b/Scripts/Functions/cli_checkFiles.sh @@ -41,7 +41,7 @@ function cli_checkFiles { # least one argument should be passed. if [[ $# -lt 1 ]];then cli_printMessage "${FUNCNAME}: `gettext "You need to provide one argument at least."`" 'AsErrorLine' - cli_printMessage "$(caller)" "AsToKnowMoreLine" + cli_printMessage "${FUNCDIRNAM}" "AsToKnowMoreLine" fi for FILE in $FILES;do @@ -121,7 +121,7 @@ function cli_checkFiles { # normal flow. if [[ "$MESSAGE" != '' ]];then cli_printMessage "$MESSAGE" "AsErrorLine" - cli_printMessage "$(caller)" "AsToKnowMoreLine" + cli_printMessage "${FUNCDIRNAM}" "AsToKnowMoreLine" fi } diff --git a/Scripts/Functions/cli_checkPathComponent.sh b/Scripts/Functions/cli_checkPathComponent.sh index 673c068..c6c6167 100755 --- a/Scripts/Functions/cli_checkPathComponent.sh +++ b/Scripts/Functions/cli_checkPathComponent.sh @@ -46,7 +46,7 @@ function cli_checkPathComponent { OPTION="$2" else cli_printMessage "${FUNCNAME}: `gettext "Invalid arguments."`" 'AsErrorLine' - cli_printMessage "$(caller)" 'AsToKnowMoreLine' + cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' fi # Define patterns. @@ -87,7 +87,7 @@ function cli_checkPathComponent { # Output message. if [[ $MESSAGE != '' ]];then cli_printMessage "$MESSAGE" 'AsErrorLine' - cli_printMessage "$(caller)" "AsToKnowMoreLine" + cli_printMessage "${FUNCDIRNAM}" "AsToKnowMoreLine" fi } diff --git a/Scripts/Functions/cli_checkRepoDirSource.sh b/Scripts/Functions/cli_checkRepoDirSource.sh index 666dc17..a4f3594 100755 --- a/Scripts/Functions/cli_checkRepoDirSource.sh +++ b/Scripts/Functions/cli_checkRepoDirSource.sh @@ -61,7 +61,7 @@ function cli_checkRepoDirSource { ACTIONVAL=$(pwd) else cli_printMessage "`eval_gettext "The location \\\`\\\$ACTIONVAL' is not valid."`" 'AsErrorLine' - cli_printMessage "$(caller)" 'AsToKnowMoreLine' + cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' fi # Remove directory from the directory stack. @@ -78,7 +78,7 @@ function cli_checkRepoDirSource { ACTIONVAL=$(pwd)/$(basename "$ACTIONVAL") else cli_printMessage "`eval_gettext "The location \\\`\\\$ACTIONVAL' is not valid."`" 'AsErrorLine' - cli_printMessage "$(caller)" 'AsToKnowMoreLine' + cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' fi # Remove directory from the directory stack. @@ -91,7 +91,7 @@ function cli_checkRepoDirSource { # is an existent working copy or valid url. So, print a # message and stop script execution. cli_printMessage "`eval_gettext "The location \\\`\\\$ACTIONVAL' is not valid."`" 'AsErrorLine' - cli_printMessage "$(caller)" 'AsToKnowMoreLine' + cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' fi diff --git a/Scripts/Functions/cli_checkRepoDirTarget.sh b/Scripts/Functions/cli_checkRepoDirTarget.sh index 7d92673..a97e76f 100755 --- a/Scripts/Functions/cli_checkRepoDirTarget.sh +++ b/Scripts/Functions/cli_checkRepoDirTarget.sh @@ -49,7 +49,7 @@ function cli_checkRepoDirTarget { # entry. We don't use existent locations as target. So, print # a message and stop script execution. cli_printMessage "`eval_gettext "The location \\\`\\\$FLAG_TO' already exists."`" 'AsErrorLine' - cli_printMessage "$(caller)" 'AsToKnowMoreLine' + cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' else @@ -82,7 +82,7 @@ function cli_checkRepoDirTarget { # directory structure. if [[ ! ${FLAG_TO} =~ '^.+/(trunk|branches|tags)/Identity/.+$' ]];then cli_printMessage "`eval_gettext "cannot create \\\`\\\$FLAG_TO': It isn't an identity directory structure."`" 'AsErrorLine' - cli_printMessage "$(caller)" 'AsToKnowMoreLine' + cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' fi fi diff --git a/Scripts/Functions/cli_doParseArguments.sh b/Scripts/Functions/cli_doParseArguments.sh index b6ad3d8..30a9cd7 100755 --- a/Scripts/Functions/cli_doParseArguments.sh +++ b/Scripts/Functions/cli_doParseArguments.sh @@ -34,7 +34,7 @@ function cli_doParseArguments { # Be sure getout parsed arguments successfully. if [[ $? != 0 ]]; then - cli_printMessage "$(caller)" 'AsToKnowMoreLine' + cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' fi } diff --git a/Scripts/Functions/cli_getFunctions.sh b/Scripts/Functions/cli_getFunctions.sh index 375b552..fc427a7 100644 --- a/Scripts/Functions/cli_getFunctions.sh +++ b/Scripts/Functions/cli_getFunctions.sh @@ -48,7 +48,7 @@ function cli_getFunctions { else cli_printMessage "`eval_gettext "The \\\$FILE hasn't execution rights."`" 'AsErrorLine' - cli_printMessage "$(caller)" "AsToKnowMoreLine" + cli_printMessage "${FUNCDIRNAM}" "AsToKnowMoreLine" fi diff --git a/Scripts/Functions/cli_getPathComponent.sh b/Scripts/Functions/cli_getPathComponent.sh index e71a058..a1f5b6e 100755 --- a/Scripts/Functions/cli_getPathComponent.sh +++ b/Scripts/Functions/cli_getPathComponent.sh @@ -45,7 +45,7 @@ function cli_getPathComponent { OPTION="$2" else cli_printMessage "${FUNCNAM}: `gettext "Invalid arguments."`" 'AsErrorLine' - cli_printMessage "$(caller)" 'AsToKnowMoreLine' + cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' fi # Define release pattern. diff --git a/Scripts/Functions/cli_getRepoParallelDirs.sh b/Scripts/Functions/cli_getRepoParallelDirs.sh index 3fc047b..09dfd1e 100755 --- a/Scripts/Functions/cli_getRepoParallelDirs.sh +++ b/Scripts/Functions/cli_getRepoParallelDirs.sh @@ -39,7 +39,7 @@ function cli_getRepoParallelDirs { BOND="$ACTIONVAL" else cli_printMessage "${FUNCNAME}: `gettext "The bond string is required."`" 'AsErrorLine' - cli_printMessage "$(caller)" 'AsToKnowMoreLine' + cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' fi # Define repository top level directory. diff --git a/Scripts/Functions/cli_getRepoTLDir.sh b/Scripts/Functions/cli_getRepoTLDir.sh index 77c522d..0a4e963 100755 --- a/Scripts/Functions/cli_getRepoTLDir.sh +++ b/Scripts/Functions/cli_getRepoTLDir.sh @@ -55,7 +55,7 @@ function cli_getRepoTLDir { esac else cli_printMessage "${FUNCNAME}: `eval_gettext "The location \\\`\\\$LOCATION' is not valid."`" 'AsErrorLine' - cli_printMessage "$(caller)" 'AsToKnowMoreLine' + cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' fi # Print location. diff --git a/Scripts/Functions/cli_getTemporalFile.sh b/Scripts/Functions/cli_getTemporalFile.sh index faddedb..3ed1d83 100755 --- a/Scripts/Functions/cli_getTemporalFile.sh +++ b/Scripts/Functions/cli_getTemporalFile.sh @@ -37,7 +37,7 @@ function cli_getTemporalFile { # value. if [[ "$NAME" == '' ]];then cli_printMessage "${FUNCNAME}: `gettext "First argument cannot be empty."`" - cli_printMessage "$(caller)" 'AsToKnowMoreLine' + cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' fi # Define source location where temporal files will be stored. diff --git a/Scripts/Functions/cli_printActionPreamble.sh b/Scripts/Functions/cli_printActionPreamble.sh index e811587..6995284 100755 --- a/Scripts/Functions/cli_printActionPreamble.sh +++ b/Scripts/Functions/cli_printActionPreamble.sh @@ -115,7 +115,7 @@ function cli_printActionPreamble { cli_printMessage "`gettext "Do you want to continue"`" 'AsYesOrNoRequestLine' elif [[ $POSITIVE == '' ]] && [[ $NEGATIVE != '' ]];then cli_printMessage "$NEGATIVE" 'AsErrorLine' - cli_printMessage "$(caller)" 'AsToKnowMoreLine' + cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine' fi }