From d0f3738781a8efea21a0d98238b0917a0681ed24 Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Jul 17 2013 00:39:23 +0000 Subject: Update the module prepare from centos-art.sh script. - Rename function suffix from cli_ to tcar_. --- diff --git a/Automation/Modules/Prepare/Scripts/prepare_getOptions.sh b/Automation/Modules/Prepare/Scripts/prepare_getOptions.sh index b5e0985..f1bfc27 100755 --- a/Automation/Modules/Prepare/Scripts/prepare_getOptions.sh +++ b/Automation/Modules/Prepare/Scripts/prepare_getOptions.sh @@ -42,7 +42,7 @@ function prepare_getOptions { local TCAR_ARGUMENTS='' # Redefine arguments using getopt(1) command parser. - cli_setArguments "${@}" + tcar_setArguments "${@}" # Reset positional parameters on this function, using output # produced from (getopt) arguments parser. @@ -53,11 +53,11 @@ function prepare_getOptions { case "$1" in -h | --help ) - cli_printHelp + tcar_printHelp ;; -v | --version ) - cli_printVersion + tcar_printVersion ;; -q | --quiet ) diff --git a/Automation/Modules/Prepare/Scripts/prepare_setConfiguration.sh b/Automation/Modules/Prepare/Scripts/prepare_setConfiguration.sh index 533134d..6e25b80 100755 --- a/Automation/Modules/Prepare/Scripts/prepare_setConfiguration.sh +++ b/Automation/Modules/Prepare/Scripts/prepare_setConfiguration.sh @@ -34,10 +34,10 @@ function prepare_setConfiguration { # Verify the file name passed to this function. Just to avoid # trickery when building the list of configuration files. - cli_checkFiles "${FILENAME}" --match="^(images|links|manual)$" + tcar_checkFiles "${FILENAME}" --match="^(images|links|manual)$" # Build list of configuration files to be produced. - local CONFIGURATION_FILES=$(cli_getFilesList \ + local CONFIGURATION_FILES=$(tcar_getFilesList \ ${TCAR_BASEDIR} --type="f" --pattern=".+/${FILENAME}\.conf") # Verify list of configuration files. @@ -64,6 +64,6 @@ function prepare_setConfiguration { fi # Process configuration files using render module. - cli_runFnEnvironment render ${CONFIGURATION_FILES} + tcar_runFnEnvironment render ${CONFIGURATION_FILES} } diff --git a/Automation/Modules/Prepare/Scripts/prepare_setPackages.sh b/Automation/Modules/Prepare/Scripts/prepare_setPackages.sh index 00de94d..ef82342 100755 --- a/Automation/Modules/Prepare/Scripts/prepare_setPackages.sh +++ b/Automation/Modules/Prepare/Scripts/prepare_setPackages.sh @@ -55,19 +55,19 @@ function prepare_setPackages { fi if [[ ! -z ${PACKAGES_UNINSTALLED} ]];then - cli_printMessage "`gettext "The following packages need to be installed:"`" --as-banner-line + tcar_printMessage "`gettext "The following packages need to be installed:"`" --as-banner-line for PACKAGE in ${PACKAGES_UNINSTALLED};do if [[ ${PACKAGE} =~ ${PACKAGES_THIRDPARTY} ]];then - cli_printMessage "${PACKAGE} (`gettext "from third party repository"`)" --as-response-line + tcar_printMessage "${PACKAGE} (`gettext "from third party repository"`)" --as-response-line else - cli_printMessage "${PACKAGE}" --as-response-line + tcar_printMessage "${PACKAGE}" --as-response-line fi done - cli_printMessage '-' --as-separator-line - cli_printMessage "`gettext "Do you want to continue"`" --as-yesornorequest-line + tcar_printMessage '-' --as-separator-line + tcar_printMessage "`gettext "Do you want to continue"`" --as-yesornorequest-line sudo yum install ${YUM_OPTIONS} ${PACKAGES_UNINSTALLED} else - cli_printMessage "`gettext "All required packages are already installed."`" --as-banner-line + tcar_printMessage "`gettext "All required packages are already installed."`" --as-banner-line fi } diff --git a/Automation/Modules/Prepare/Scripts/prepare_updateDirectoryStructure.sh b/Automation/Modules/Prepare/Scripts/prepare_updateDirectoryStructure.sh index b7c8f7f..0ac0b42 100755 --- a/Automation/Modules/Prepare/Scripts/prepare_updateDirectoryStructure.sh +++ b/Automation/Modules/Prepare/Scripts/prepare_updateDirectoryStructure.sh @@ -60,15 +60,15 @@ function prepare_updateDirectoryStructure { # Define absolute path to design models' directory structure. This # directory contains the directory structure you want to verify # inside target path. - local SOURCE_PATH=$(cli_checkRepoDirSource "${1}") + local SOURCE_PATH=$(tcar_checkRepoDirSource "${1}") # Verify existence source path, just to be sure it was passed and # it is a valid directory. - cli_checkFiles ${SOURCE_PATH} -d + tcar_checkFiles ${SOURCE_PATH} -d # Define absolute path to directory inside the repository where # you want to replicate the source path directory structure. - local TARGET_PATH=$(cli_checkRepoDirSource "${2}") + local TARGET_PATH=$(tcar_checkRepoDirSource "${2}") # NOTE: It is possible that target path doesn't exist. So verify # the relation between target and source path. If there is a @@ -76,7 +76,7 @@ function prepare_updateDirectoryStructure { # using the related source directory as reference. # Define list of directories inside source path. - local SOURCE_DIRS=$(cli_getFilesList ${SOURCE_PATH} \ + local SOURCE_DIRS=$(tcar_getFilesList ${SOURCE_PATH} \ --pattern='.+/[[:alpha:]]+$' --type=d) # Iterate through directories inside source path and verify