From 5a5b08bbdb156f3d066babf0409a05e1c0d65905 Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Jul 29 2011 13:59:18 +0000 Subject: Rename variable name from FUNCNAM to CLI_FUNCNAME inside `centos-art.sh' script functionalities. --- diff --git a/Scripts/Functions/Help/help.sh b/Scripts/Functions/Help/help.sh index 2a0a29b..f38b1cf 100755 --- a/Scripts/Functions/Help/help.sh +++ b/Scripts/Functions/Help/help.sh @@ -72,14 +72,14 @@ function help { local MANUAL_DOCENTRY_ID=0 # Interpret option arguments passed through the command-line. - ${FUNCNAM}_getOptions + ${CLI_FUNCNAME}_getOptions # Redefine arrays related to documentation entries using # non-option arguments passed through the command-line. At this # point all options have been removed from ARGUMENTS and # non-option arguments remain. Evaluate ARGUMENTS to retrive the # information related documentation entries from there. - ${FUNCNAM}_getEntries + ${CLI_FUNCNAME}_getEntries # Initialize documentation backend functionalities. At this point # we load all functionalities required into `centos-art.sh''s diff --git a/Scripts/Functions/Locale/locale.sh b/Scripts/Functions/Locale/locale.sh index 6670546..2c8253d 100755 --- a/Scripts/Functions/Locale/locale.sh +++ b/Scripts/Functions/Locale/locale.sh @@ -57,7 +57,7 @@ function locale { L10N_BASEDIR="$(cli_getRepoTLDir)/L10n" # Interpret arguments and options passed through command-line. - ${FUNCNAM}_getOptions + ${CLI_FUNCNAME}_getOptions # Redefine positional parameters using ARGUMENTS. At this point, # option arguments have been removed from ARGUMENTS variable and diff --git a/Scripts/Functions/Locale/locale_editMessages.sh b/Scripts/Functions/Locale/locale_editMessages.sh index d8bd3e1..7d44c68 100755 --- a/Scripts/Functions/Locale/locale_editMessages.sh +++ b/Scripts/Functions/Locale/locale_editMessages.sh @@ -82,7 +82,7 @@ function locale_editMessages { eval ${EDITOR} ${FILE} # Update machine object (.mo) from portable object (.po). - ${FUNCNAM}_updateMessageBinary ${FILE} + ${CLI_FUNCNAME}_updateMessageBinary ${FILE} done diff --git a/Scripts/Functions/Locale/locale_getOptions.sh b/Scripts/Functions/Locale/locale_getOptions.sh index 3990960..3a4ecad 100755 --- a/Scripts/Functions/Locale/locale_getOptions.sh +++ b/Scripts/Functions/Locale/locale_getOptions.sh @@ -65,17 +65,17 @@ function locale_getOptions { ;; --update ) - ACTIONNAMS="$ACTIONNAMS ${FUNCNAM}_updateMessages" + ACTIONNAMS="$ACTIONNAMS ${CLI_FUNCNAME}_updateMessages" shift 1 ;; --edit ) - ACTIONNAMS="$ACTIONNAMS ${FUNCNAM}_editMessages" + ACTIONNAMS="$ACTIONNAMS ${CLI_FUNCNAME}_editMessages" shift 1 ;; --delete ) - ACTIONNAMS="$ACTIONNAMS ${FUNCNAM}_deleteMessages" + ACTIONNAMS="$ACTIONNAMS ${CLI_FUNCNAME}_deleteMessages" shift 1 ;; @@ -103,7 +103,7 @@ function locale_getOptions { # Verify action names. When no action name is specified, use # edition as default action name. if [[ $ACTIONNAMS == '' ]];then - ACTIONNAMS="${FUNCNAM}_editMessages" + ACTIONNAMS="${CLI_FUNCNAME}_editMessages" fi # Redefine ARGUMENTS variable using current positional parameters. diff --git a/Scripts/Functions/Locale/locale_updateMessagePObjects.sh b/Scripts/Functions/Locale/locale_updateMessagePObjects.sh index 37393d8..fe8e9ef 100755 --- a/Scripts/Functions/Locale/locale_updateMessagePObjects.sh +++ b/Scripts/Functions/Locale/locale_updateMessagePObjects.sh @@ -57,7 +57,7 @@ function locale_updateMessagePObjects { # Sanitate portable object metadata. This is the first time # the portable object is created so some modifications are # needed to customized metadata. - ${FUNCNAM}_updateMessageMetadata "${FILE}.po" + ${CLI_FUNCNAME}_updateMessageMetadata "${FILE}.po" fi diff --git a/Scripts/Functions/Locale/locale_updateMessageShell.sh b/Scripts/Functions/Locale/locale_updateMessageShell.sh index 88d78f4..d3733a6 100755 --- a/Scripts/Functions/Locale/locale_updateMessageShell.sh +++ b/Scripts/Functions/Locale/locale_updateMessageShell.sh @@ -57,10 +57,10 @@ function locale_updateMessageShell { --width=70 --sort-by-file ${FILES} # Sanitate portable object template metadata. - ${FUNCNAM}_updateMessageMetadata "${FILE}.pot" + ${CLI_FUNCNAME}_updateMessageMetadata "${FILE}.pot" # Verify, initialize or update portable objects from portable # object templates. - ${FUNCNAM}_updateMessagePObjects "${FILE}" + ${CLI_FUNCNAME}_updateMessagePObjects "${FILE}" } diff --git a/Scripts/Functions/Locale/locale_updateMessageXml.sh b/Scripts/Functions/Locale/locale_updateMessageXml.sh index 93c03b5..c280877 100755 --- a/Scripts/Functions/Locale/locale_updateMessageXml.sh +++ b/Scripts/Functions/Locale/locale_updateMessageXml.sh @@ -70,6 +70,6 @@ function locale_updateMessageXml { # Verify, initialize or merge portable objects from portable # object templates. - ${FUNCNAM}_updateMessagePObjects "${FILE}" + ${CLI_FUNCNAME}_updateMessagePObjects "${FILE}" } diff --git a/Scripts/Functions/Locale/locale_updateMessages.sh b/Scripts/Functions/Locale/locale_updateMessages.sh index 30c1964..64dcf7a 100755 --- a/Scripts/Functions/Locale/locale_updateMessages.sh +++ b/Scripts/Functions/Locale/locale_updateMessages.sh @@ -44,14 +44,14 @@ function locale_updateMessages { # Update translatable strings inside the portable object # template related to XML-based files (e.g., scalable vector # graphics). - ${FUNCNAM}_updateMessageXml + ${CLI_FUNCNAME}_updateMessageXml elif [[ $ACTIONVAL =~ "^$(cli_getRepoTLDir)/Scripts$" ]];then # Update translatable strings inside the portable object # template related to shell scripts (e.g., the centos-art.sh # script). - ${FUNCNAM}_updateMessageShell + ${CLI_FUNCNAME}_updateMessageShell else diff --git a/Scripts/Functions/Prepare/prepare.sh b/Scripts/Functions/Prepare/prepare.sh index f75b72e..65bd121 100755 --- a/Scripts/Functions/Prepare/prepare.sh +++ b/Scripts/Functions/Prepare/prepare.sh @@ -35,24 +35,24 @@ function prepare { local PREPARE_CONFIG_DIR=${FUNCDIR}/${FUNCDIRNAM}/Config # Interpret arguments and options passed through command-line. - ${FUNCNAM}_getOptions + ${CLI_FUNCNAME}_getOptions # Execute action names based on whether they were provided or not. if [[ $ACTIONNAMS == '' ]];then # When action names are not provided, define action names that # will take place, explicitly. - ${FUNCNAM}_updatePackages - ${FUNCNAM}_updateLinks - ${FUNCNAM}_updateImages - ${FUNCNAM}_updateManuals + ${CLI_FUNCNAME}_updatePackages + ${CLI_FUNCNAME}_updateLinks + ${CLI_FUNCNAME}_updateImages + ${CLI_FUNCNAME}_updateManuals else # When action names are provided, loop through them and # execute them one by one. for ACTIONNAM in $ACTIONNAMS;do - ${FUNCNAM}_${ACTIONNAM} + ${CLI_FUNCNAME}_${ACTIONNAM} done fi diff --git a/Scripts/Functions/Render/render.sh b/Scripts/Functions/Render/render.sh index 591e8e3..024908f 100755 --- a/Scripts/Functions/Render/render.sh +++ b/Scripts/Functions/Render/render.sh @@ -109,11 +109,11 @@ function render { # take the action value (ACTIONVAL) as reference and describe # the production through an action name (ACTIONNAM). if [[ $ACTIONVAL =~ "^$(cli_getRepoTLDir)/Identity/Images/Themes" ]];then - ACTIONNAM="${FUNCNAME}_doThemeActions" + ACTIONNAM="${CLI_FUNCNAME}_doThemeActions" elif [[ $ACTIONVAL =~ "^$(cli_getRepoTLDir)/Identity/Images" ]];then - ACTIONNAM="${FUNCNAME}_doBaseActions" + ACTIONNAM="${CLI_FUNCNAME}_doBaseActions" elif [[ $ACTIONVAL =~ "^$(cli_getRepoTLDir)/Manuals" ]];then - ACTIONNAM="${FUNCNAME}_doBaseActions" + ACTIONNAM="${CLI_FUNCNAME}_doBaseActions" else cli_printMessage "`gettext "The path provided does not support rendition."`" --as-error-line fi diff --git a/Scripts/Functions/Tuneup/tuneup.sh b/Scripts/Functions/Tuneup/tuneup.sh index a099c4d..569704a 100755 --- a/Scripts/Functions/Tuneup/tuneup.sh +++ b/Scripts/Functions/Tuneup/tuneup.sh @@ -54,7 +54,7 @@ function tuneup { # centos-art, there is only one action to perform (i.e., build the # list of files and interpretation of file extensions for further # processing). - ACTIONNAM="${FUNCNAME}_doBaseActions" + ACTIONNAM="${CLI_FUNCNAME}_doBaseActions" # Define action value. We use non-option arguments to define the # action value (ACTIONVAL) variable. diff --git a/Scripts/Functions/cli.sh b/Scripts/Functions/cli.sh index 5c1ba28..b692693 100755 --- a/Scripts/Functions/cli.sh +++ b/Scripts/Functions/cli.sh @@ -28,7 +28,7 @@ function cli { # Initialize global variables. - local FUNCNAM='' + local CLI_FUNCNAME='' local FUNCDIR='' local FUNCDIRNAM='' local FUNCSCRIPT='' @@ -73,16 +73,16 @@ function cli { exit fi - # Define function name (FUNCNAM) variable from first command-line + # Define function name (CLI_FUNCNAME) variable from first command-line # argument. As convenction we use the first argument to determine # the exact name of functionality to call. - FUNCNAM=$(cli_getRepoName $1 -f) + CLI_FUNCNAME=$(cli_getRepoName $1 -f) # Define function directory. - FUNCDIRNAM=$(cli_getRepoName $FUNCNAM -d) + FUNCDIRNAM=$(cli_getRepoName $CLI_FUNCNAME -d) # Define function file name. - FUNCSCRIPT=${FUNCDIR}/${FUNCDIRNAM}/${FUNCNAM}.sh + FUNCSCRIPT=${FUNCDIR}/${FUNCDIRNAM}/${CLI_FUNCNAME}.sh # Check function script execution rights. cli_checkFiles "${FUNCSCRIPT}" --execution @@ -108,6 +108,6 @@ function cli { cli_exportFunctions "${FUNCDIR}/${FUNCDIRNAM}" # Execute function. - eval $FUNCNAM + eval $CLI_FUNCNAME } diff --git a/Scripts/Functions/cli_exportFunctions.sh b/Scripts/Functions/cli_exportFunctions.sh index 5c5145d..06c5b8f 100755 --- a/Scripts/Functions/cli_exportFunctions.sh +++ b/Scripts/Functions/cli_exportFunctions.sh @@ -33,9 +33,9 @@ function cli_exportFunctions { # Verify suffix value used to retrive function files. Assuming no # suffix value is passed as second argument to this function, use - # the function name value (FUNCNAM) as default value. + # the function name value (CLI_FUNCNAME) as default value. if [[ $SUFFIX == '' ]];then - SUFFIX=$FUNCNAM + SUFFIX=$CLI_FUNCNAME fi # Define pattern used to retrive function names from function diff --git a/Scripts/Functions/cli_unsetFunctions.sh b/Scripts/Functions/cli_unsetFunctions.sh index 3be4be4..48fe20d 100755 --- a/Scripts/Functions/cli_unsetFunctions.sh +++ b/Scripts/Functions/cli_unsetFunctions.sh @@ -33,9 +33,9 @@ function cli_unsetFunctions { # Verify suffix value used to retrive function files. Assuming no # suffix value is passed as second argument to this function, use - # the function name value (FUNCNAM) as default value. + # the function name value (CLI_FUNCNAME) as default value. if [[ $SUFFIX == '' ]];then - SUFFIX=$FUNCNAM + SUFFIX=$CLI_FUNCNAME fi # Define list of backend-specific functionalities. This is the