|
|
878a2b |
#!/bin/bash
|
|
|
878a2b |
#
|
|
|
878a2b |
# prepare_updateManuals.sh -- This option initializes documentation files
|
|
|
878a2b |
# inside the working copy. When you provide this option, the
|
|
|
878a2b |
# centos-art.sh script renders all documentation manuals from their
|
|
|
878a2b |
# related source files so you can read them nicely.
|
|
|
878a2b |
#
|
|
|
03486a |
# Copyright (C) 2009, 2010, 2011, 2012 The CentOS Project
|
|
|
878a2b |
#
|
|
|
878a2b |
# This program is free software; you can redistribute it and/or modify
|
|
|
878a2b |
# it under the terms of the GNU General Public License as published by
|
|
|
878a2b |
# the Free Software Foundation; either version 2 of the License, or (at
|
|
|
878a2b |
# your option) any later version.
|
|
|
878a2b |
#
|
|
|
878a2b |
# This program is distributed in the hope that it will be useful, but
|
|
|
878a2b |
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
878a2b |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
878a2b |
# General Public License for more details.
|
|
|
878a2b |
#
|
|
|
878a2b |
# You should have received a copy of the GNU General Public License
|
|
|
878a2b |
# along with this program; if not, write to the Free Software
|
|
|
878a2b |
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
878a2b |
#
|
|
|
878a2b |
# ----------------------------------------------------------------------
|
|
|
878a2b |
# $Id$
|
|
|
878a2b |
# ----------------------------------------------------------------------
|
|
|
878a2b |
|
|
|
878a2b |
function prepare_updateManuals {
|
|
|
878a2b |
|
|
|
878a2b |
local RELEASE=$(cat /etc/redhat-release | gawk '{ print $3 }')
|
|
|
878a2b |
|
|
|
3725b1 |
# Define base directory used by documentation manuals. This is the
|
|
|
3725b1 |
# top level directory where all documentation manuals are stored
|
|
|
3725b1 |
# in the repository.
|
|
|
3725b1 |
local MANUALS=Manuals
|
|
|
3725b1 |
|
|
|
a96088 |
# Define key documentation manuals.
|
|
|
3725b1 |
local MANUALS_NAMES="Tcar-ug Tcar-fs"
|
|
|
3725b1 |
|
|
|
a96088 |
# Verify related design models, images, and common stylesheets
|
|
|
a96088 |
# used by documentation manuals.
|
|
|
a96088 |
for DIR in $(echo "Identity/Images/Manuals
|
|
|
a96088 |
Identity/Models/Manuals
|
|
|
07f317 |
Identity/Webenv/Themes
|
|
|
a96088 |
Identity/Models/Webenv
|
|
|
a96088 |
Identity/Images/Webenv");do
|
|
|
3725b1 |
MANUALS_ABSPATH=$(cli_getRepoTLDir)/${DIR}
|
|
|
3725b1 |
if [[ ! -d $MANUALS_ABSPATH ]];then
|
|
|
3725b1 |
cli_printMessage "`eval_gettext "The directory \\\"\\\$MANUALS_ABSPATH\\\" doesn't exist."`"
|
|
|
3725b1 |
cli_printMessage "`gettext "Do you want to download a working copy for it now?"`" --as-yesornorequest-line
|
|
|
3725b1 |
mkdir -p $MANUALS_ABSPATH
|
|
|
a96088 |
svn co $(cli_printUrl --projects-artwork)trunk/${DIR} ${MANUALS_ABSPATH}
|
|
|
3725b1 |
fi
|
|
|
3725b1 |
done
|
|
|
3725b1 |
|
|
|
3725b1 |
# Verify directory structure used by documentation manuals.
|
|
|
3725b1 |
for MANUALS_NAME in $MANUALS_NAMES;do
|
|
|
3725b1 |
MANUALS_ABSPATH=$(cli_getRepoTLDir)/${MANUALS}/${MANUALS_NAME}
|
|
|
3725b1 |
if [[ ! -d $MANUALS_ABSPATH ]];then
|
|
|
3725b1 |
cli_printMessage "`eval_gettext "The directory \\\"\\\$MANUALS_ABSPATH\\\" doesn't exist."`"
|
|
|
3725b1 |
cli_printMessage "`gettext "Do you want to download a working copy for it now?"`" --as-yesornorequest-line
|
|
|
3725b1 |
mkdir -p $MANUALS_ABSPATH
|
|
|
3725b1 |
svn co $(cli_printUrl --projects-artwork)trunk/${MANUALS}/${MANUALS_NAME} ${MANUALS_ABSPATH}
|
|
|
3725b1 |
fi
|
|
|
3725b1 |
done
|
|
|
3725b1 |
|
|
|
07f317 |
# Render key documentation manuals.
|
|
|
07f317 |
${CLI_BASEDIR}/${CLI_NAME}.sh render trunk/Manuals/Tcar-ug --dont-commit-changes --filter=tcar-ug
|
|
|
3725b1 |
${CLI_BASEDIR}/${CLI_NAME}.sh help trunk/Manuals/Tcar-fs --update --dont-commit-changes
|
|
|
878a2b |
|
|
|
878a2b |
}
|