From c52a31f72a60508d1dbe0d8a7f5fe68025e81298 Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Dec 28 2013 02:00:51 +0000 Subject: Update render module from tcar script. - Previously, path verification was using the tcar_checkRepoDirSource function which points to TCAR_BASEDIR. This made the render module to consider the path provided in the command-line as a relative path inside the installed repository not the workplace. This made the script to fail because the path provided doesn't exist. This update changes the render module to use tcar_checkWorkDirSource function which points to TCAR_WORKDIR instead. This way, the render module looks inside the workplace, not the installed repository. --- diff --git a/tcar-scripts-render/Modules/Directories/directories.sh b/tcar-scripts-render/Modules/Directories/directories.sh index 8f132c9..949d810 100755 --- a/tcar-scripts-render/Modules/Directories/directories.sh +++ b/tcar-scripts-render/Modules/Directories/directories.sh @@ -28,7 +28,7 @@ function directories { - local DIRECTORY=$(tcar_checkRepoDirSource "${1}") + local DIRECTORY=$(tcar_checkWorkDirSource "${1}") local CONFIGURATION_FILES=$(tcar_getFilesList ${DIRECTORY} \ --pattern=".+/.+\.conf$" --type='f') diff --git a/tcar-scripts-render/Modules/Files/Modules/Asciidoc/asciidoc_setXhtmlRendition.sh b/tcar-scripts-render/Modules/Files/Modules/Asciidoc/asciidoc_setXhtmlRendition.sh index bbe02e8..526b36e 100755 --- a/tcar-scripts-render/Modules/Files/Modules/Asciidoc/asciidoc_setXhtmlRendition.sh +++ b/tcar-scripts-render/Modules/Files/Modules/Asciidoc/asciidoc_setXhtmlRendition.sh @@ -27,7 +27,7 @@ function asciidoc_setXhtmlRendition { - local LOCATION=$(tcar_checkRepoDirSource "${1}") + local LOCATION=$(tcar_checkWorkDirSource "${1}") RENDER_PAGES=$(tcar_getConfigValue "${CONFIGURATION}" "${SECTION}" "render-page") if [[ -z ${RENDER_PAGES} ]];then diff --git a/tcar-scripts-render/Modules/Files/files.sh b/tcar-scripts-render/Modules/Files/files.sh index 14a5f29..afd5c21 100755 --- a/tcar-scripts-render/Modules/Files/files.sh +++ b/tcar-scripts-render/Modules/Files/files.sh @@ -28,7 +28,7 @@ function files { - local CONFIGURATION=$(tcar_checkRepoDirSource "${1}") + local CONFIGURATION=$(tcar_checkWorkDirSource "${1}") local -a SECTIONS local SECTION='' diff --git a/tcar-scripts-render/render.sh b/tcar-scripts-render/render.sh index e9edb20..ec898fe 100755 --- a/tcar-scripts-render/render.sh +++ b/tcar-scripts-render/render.sh @@ -41,7 +41,7 @@ function render { # Sanitate non-option arguments to be sure they match the # directory conventions established by centos-art.sh script # against source directory locations in the working copy. - local ARGUMENT=$(tcar_checkRepoDirSource ${ARGUMENT}) + local ARGUMENT=$(tcar_checkWorkDirSource ${ARGUMENT}) if [[ -d ${ARGUMENT} ]];then tcar_setModuleEnvironment -m 'directories' -t 'child' -g ${ARGUMENT}