From 0ba8c93d4c6c058e9650676feec9d50fa6a69421 Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Jul 08 2013 21:26:51 +0000 Subject: Update prepare functionality. - Rename variable name from ARGUMENTS to CLI_FUNCTION_ARGUMENTS. This is the convention being followed inside centos-art.sh script. --- diff --git a/Automation/centos-art.sh-mods/Prepare/prepare.sh b/Automation/centos-art.sh-mods/Prepare/prepare.sh index f9d8fc2..63ea90c 100755 --- a/Automation/centos-art.sh-mods/Prepare/prepare.sh +++ b/Automation/centos-art.sh-mods/Prepare/prepare.sh @@ -37,10 +37,11 @@ function prepare { # Interpret arguments and options passed through command-line. prepare_getOptions - # Redefine positional parameters using ARGUMENTS. At this point, - # option arguments have been removed from ARGUMENTS variable and - # only non-option arguments remain in it. - eval set -- "$ARGUMENTS" + # Redefine positional parameters using CLI_FUNCTION_ARGUMENTS. At + # this point, option arguments have been removed from + # CLI_FUNCTION_ARGUMENTS variable and only non-option arguments + # remain in it. + eval set -- "$CLI_FUNCTION_ARGUMENTS" # Execute action names based on whether they were provided or not. if [[ $ACTIONNAMS == '' ]];then diff --git a/Automation/centos-art.sh-mods/Prepare/prepare_getOptions.sh b/Automation/centos-art.sh-mods/Prepare/prepare_getOptions.sh index 7fc5c50..484f8ac 100755 --- a/Automation/centos-art.sh-mods/Prepare/prepare_getOptions.sh +++ b/Automation/centos-art.sh-mods/Prepare/prepare_getOptions.sh @@ -33,12 +33,12 @@ function prepare_getOptions { # Define long options we want to support. local ARGSL="help,quiet,answer-yes,packages,locales,links,images,manuals,directories,set-environment,see-environment,synchronize" - # Redefine ARGUMENTS using getopt(1) command parser. + # Redefine CLI_FUNCTION_ARGUMENTS using getopt(1) command parser. cli_parseArguments # Reset positional parameters using output from (getopt) argument # parser. - eval set -- "$ARGUMENTS" + eval set -- "$CLI_FUNCTION_ARGUMENTS" # Look for options passed through command-line. while true; do @@ -122,7 +122,8 @@ function prepare_getOptions { esac done - # Redefine ARGUMENTS variable using current positional parameters. + # Redefine CLI_FUNCTION_ARGUMENTS variable using current + # positional parameters. cli_parseArgumentsReDef "$@" }