From f446c2303bd6ac90d1fa23db4baf39b2e25c571d Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Jul 16 2013 03:46:22 +0000 Subject: Update the cli_initModule.sh file. - When only the first argument is provided to centos-art.sh script, print the module's name and version and finish the script execution successfully. This is valid to all modules. --- diff --git a/Automation/Modules/Cli/Scripts/cli_initModule.sh b/Automation/Modules/Cli/Scripts/cli_initModule.sh index 38b496d..4c1fe13 100755 --- a/Automation/Modules/Cli/Scripts/cli_initModule.sh +++ b/Automation/Modules/Cli/Scripts/cli_initModule.sh @@ -55,6 +55,13 @@ function cli_initModule { # start counting from second argument (inclusive) on. shift 1 + # Verify number of arguments passed to centos-art.sh script. By + # default, to all modules, when no option is provided the version + # information is printed. + if [[ $# -lt 1 ]];then + cli_printVersion + fi + # Go for function initialization. Keep the cli_exportFunctions # function calling after all variables and arguments definitions. cli_exportFunctions "${MODULE_INIT_FILE}"