diff --git a/Scripts/tcar_printHelp.sh b/Scripts/tcar_printHelp.sh index 3301eb5..baa5c46 100755 --- a/Scripts/tcar_printHelp.sh +++ b/Scripts/tcar_printHelp.sh @@ -26,27 +26,14 @@ # Standardize the way tcar.sh script prints help about itself. function tcar_printHelp { - # Retrieve the man page name. This is the file name you want to retrieve - # documentation for. This value is optional. When it is not passed, the - # module name is used. - local TCAR_MANPAGE_NAME="${1:-${TCAR_MODULE_NAME}}" - - # When the module name has not been set and the tcar_printHelp - # function is called from tcar.sh file, the page name come - # with with --help as opening string and probably as - # --help=filename.sh. In the first case it prints the script - # documentation. In the second case it prints documentation for - # the file specified. if [[ -z ${TCAR_MODULE_NAME} ]];then - if [[ ${TCAR_MANPAGE_NAME} =~ '^--help=[[:alnum:]_-.]+' ]];then - TCAR_MANPAGE_NAME=$(echo ${TCAR_MANPAGE_NAME} | cut -d'=' -f2) - else - TCAR_MANPAGE_NAME=${TCAR_SCRIPT_NAME} - fi + TCAR_MANPAGE_NAME=${TCAR_SCRIPT_NAME} + else + TCAR_MANPAGE_NAME=${TCAR_SCRIPT_NAME}-${TCAR_MODULE_NAME} fi # Print requested documentation. - /usr/bin/man -M ${TCAR_SCRIPT_DIR_MANUALS}:${TCAR_MODULE_DIR_MANUALS}/Final "${TCAR_MANPAGE_NAME}" + /usr/bin/man -M ${TCAR_SCRIPT_DIR_MANUALS} "${TCAR_MANPAGE_NAME}" # Finish script execution successfully. exit 0