From 6905d4b31a26e300cf585fa07629951ba03885ba Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Jan 15 2014 04:21:18 +0000 Subject: Update prepare_getOptions function. - Previously, the help option accepted an argument. Since documentation related to internal functions was moved to a reference manual and man pages are no longer supported for them, the help option prints the script or module documentation only, and no option argument should be used for the help option in any case (it wouldn't print anything). This update updates the prepare_getOptions function to eliminate the possibility of passing option arguments to the help option. Likewise, the first argument of tcar_printHelp function is no longer required. The tcar_printHelp function is working with the TCAR_MODULE_NAME environment variable to determine the man page that must be printed out. --- diff --git a/Scripts/Modules/Prepare/prepare_getOptions.sh b/Scripts/Modules/Prepare/prepare_getOptions.sh index 2bf60a4..61dc454 100755 --- a/Scripts/Modules/Prepare/prepare_getOptions.sh +++ b/Scripts/Modules/Prepare/prepare_getOptions.sh @@ -29,10 +29,10 @@ function prepare_getOptions { # Define short options we want to support. - local ARGSS="h::,v" + local ARGSS="h,v" # Define long options we want to support. - local ARGSL="help::,version" + local ARGSL="help,version" # Redefine arguments using getopt(1) command parser. tcar_setModuleArguments @@ -46,7 +46,7 @@ function prepare_getOptions { case "${1}" in -h | --help ) - tcar_printHelp "${2}" + tcar_printHelp ;; -v | --version )