From cd44d05ddaed90c66ea074359fc6386a26df4673 Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Sep 14 2012 19:57:30 +0000 Subject: Update `Functions/Commons/cli_exportFunctions.sh' file. --- diff --git a/Scripts/Bash/Functions/Commons/cli_exportFunctions.sh b/Scripts/Bash/Functions/Commons/cli_exportFunctions.sh index 774612f..446f13c 100755 --- a/Scripts/Bash/Functions/Commons/cli_exportFunctions.sh +++ b/Scripts/Bash/Functions/Commons/cli_exportFunctions.sh @@ -34,7 +34,7 @@ function cli_exportFunctions { local EXPORTID=$1 # Define the source location where function files are placed in. - local LOCATION=${CLI_BASEDIR}/Functions/$(dirname "$EXPORTID") + local LOCATION=${CLI_BASEDIR}/Functions/$(dirname ${EXPORTID}) # Define suffix used to retrieve function files. local SUFFIX=$(basename "$EXPORTID") @@ -44,9 +44,13 @@ function cli_exportFunctions { # function, use the function name value (CLI_FUNCNAME) as default # value. if [[ $SUFFIX == '' ]];then - SUFFIX="${CLI_FUNCNAME}[[:alpha:]_]*" + SUFFIX="${CLI_FUNCNAME}" fi + # Redefine suffix to match all related function files inside the + # related function directory. + SUFFIX=${SUFFIX}'[[:alpha:]_]*' + # Define the pattern used to retrieve function names from function # files. local PATTERN="^function[[:space:]]+${SUFFIX}[[:space:]]+{$" @@ -54,7 +58,7 @@ function cli_exportFunctions { # Define the list of files. local FUNCFILE='' local FUNCFILES=$(cli_getFilesList ${LOCATION} --pattern="${SUFFIX}\.sh$" \ - --maxdepth="1" --mindepth="1" --type="f") + --maxdepth='1' --mindepth='1' --type='f') # Verify the list of files. If no function file exists for the # location specified stop the script execution. Otherwise the