From e60640bd059eac6b065eac99351074de3c5979f8 Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Dec 26 2013 23:14:32 +0000 Subject: Merge branch 'tcar-scripts-prepare' into tcar --- diff --git a/tcar-scripts-prepare/prepare.sh b/tcar-scripts-prepare/prepare.sh index 32ab08d..5ddf768 100755 --- a/tcar-scripts-prepare/prepare.sh +++ b/tcar-scripts-prepare/prepare.sh @@ -43,11 +43,8 @@ function prepare { prepare_getOptions - # Define absolute path to workplace. The workplace is where final - # images produced from source files will be stored and organized - # in. - local TCAR_WORKPLACE=${TCAR_SCRIPT_ARGUMENT} - - prepare_setWorkplace + for TCAR_WORKDIR ${TCAR_SCRIPT_ARGUMENT};do + prepare_setWorkplace + done } diff --git a/tcar-scripts-prepare/prepare_getWorkplaceDir.sh b/tcar-scripts-prepare/prepare_getWorkplaceDir.sh index 9cf939a..b04d034 100755 --- a/tcar-scripts-prepare/prepare_getWorkplaceDir.sh +++ b/tcar-scripts-prepare/prepare_getWorkplaceDir.sh @@ -31,7 +31,7 @@ function prepare_getWorkplaceDir { local DIRECTORY=$1 echo ${DIRECTORY} \ - | sed -r -e "s!${TCAR_BASEDIR}/Models/!${TCAR_WORKPLACE}/!" \ + | sed -r -e "s!${TCAR_BASEDIR}/Models/!${TCAR_WORKDIR}/!" \ -e 's!/[a-z]+\.conf(\.tpl)?$!!' } diff --git a/tcar-scripts-prepare/prepare_setWorkplace.sh b/tcar-scripts-prepare/prepare_setWorkplace.sh index d29a81e..9f81867 100755 --- a/tcar-scripts-prepare/prepare_setWorkplace.sh +++ b/tcar-scripts-prepare/prepare_setWorkplace.sh @@ -32,26 +32,26 @@ function prepare_setWorkplace { local CONF='' - if [[ -d ${TCAR_WORKPLACE} ]];then + if [[ -d ${TCAR_WORKDIR} ]];then tcar_printMessage "`gettext "The workplace you provided already exist and will be removed."`" --as-stdout-line tcar_printMessage "`gettext "Do you want to continue?"`" --as-yesornorequest-line - tcar_printMessage "${TCAR_WORKPLACE}" --as-removing-line - rm -r ${TCAR_WORKPLACE} + tcar_printMessage "${TCAR_WORKDIR}" --as-removing-line + rm -r ${TCAR_WORKDIR} fi - tcar_printMessage "${TCAR_WORKPLACE}" --as-creating-line + tcar_printMessage "${TCAR_WORKDIR}" --as-creating-line for CONF in $(prepare_getWorkplaceConf);do - local TCAR_WORKPLACE_DIR=$(prepare_getWorkplaceDir ${CONF}) - local TCAR_WORKPLACE_LNK=${TCAR_WORKPLACE_DIR}/render.conf - mkdir -p ${TCAR_WORKPLACE_DIR} && ln -s ${CONF} ${TCAR_WORKPLACE_LNK} - tcar_checkFiles -s ${TCAR_WORKPLACE_LNK} + local TCAR_WORKDIR_DIR=$(prepare_getWorkplaceDir ${CONF}) + local TCAR_WORKDIR_LNK=${TCAR_WORKDIR_DIR}/render.conf + mkdir -p ${TCAR_WORKDIR_DIR} && ln -s ${CONF} ${TCAR_WORKDIR_LNK} + tcar_checkFiles -s ${TCAR_WORKDIR_LNK} done - if [[ -d ${TCAR_WORKPLACE}/Brands ]];then + if [[ -d ${TCAR_WORKDIR}/Brands ]];then tcar_printMessage "`gettext "The workplace doesn't include images for branding other images."`" tcar_printMessage "`gettext "Do you want to render them now?"`" --as-yesornorequest-line - prepare_setRenderEnvironment -o "render-type" -v "svg" ${TCAR_WORKPLACE}/Brands + prepare_setRenderEnvironment -o "render-type" -v "svg" ${TCAR_WORKDIR}/Brands fi }