| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function prepare_setRenderEnvironment { |
| |
| OPTIND=1 |
| while getopts "o:,v:" OPTION "${@}"; do |
| |
| case "${OPTION}" in |
| |
| o ) |
| |
| |
| local OPTION_NAME=${OPTARG} |
| if [[ -z ${OPTION_NAME} ]];then |
| tcar_printMessage "`gettext "The option name cannot be empty."`" --as-error-line |
| fi |
| ;; |
| |
| v ) |
| |
| |
| local OPTION_VALUE=${OPTARG} |
| if [[ -z ${OPTION_VALUE} ]];then |
| tcar_printMessage "`gettext "The option value cannot be empty."`" --as-error-line |
| fi |
| ;; |
| |
| esac |
| |
| done |
| |
| |
| |
| shift $(( ${OPTIND} - 1 )) |
| |
| |
| |
| |
| if [[ -z ${@} ]];then |
| tcar_printMessage "`gettext "The search path cannot be empty."`" --as-error-line |
| fi |
| |
| |
| local -a CONFIGURATION_FILES |
| |
| |
| |
| |
| local CONFIGURATION_PATTERN="^${OPTION_NAME}[[:space:]]*=[[:space:]]*\"${OPTION_VALUE}\"$" |
| |
| for DIRECTORY in ${@};do |
| |
| |
| |
| |
| DIRECTORY=$(tcar_checkRepoDirSource ${DIRECTORY}) |
| |
| |
| tcar_checkFiles -ed ${DIRECTORY} |
| |
| |
| |
| |
| |
| CONFIGURATION_FILES[++${#CONFIGURATION_FILES[*]}]=$(tcar_getFilesList \ |
| ${DIRECTORY} --pattern='.+\.conf$' --type='f' \ |
| | xargs egrep ${CONFIGURATION_PATTERN} | cut -d: -f1 | sort | uniq) |
| |
| done |
| |
| |
| tcar_setModuleEnvironment -m "render" -t "parent" ${CONFIGURATION_FILES[*]} |
| } |