Blame Scripts/Bash/Functions/Help/help_updateOutputFileHtml.sh

d3e9d7
#!/bin/bash
d3e9d7
#
d3e9d7
# help_updateOutputFileHtml.sh -- This function updates manuals' html
d3e9d7
# related output files.
d3e9d7
#
d3e9d7
# Copyright (C) 2009, 2010 Alain Reguera Delgado
d3e9d7
# 
d3e9d7
# This program is free software; you can redistribute it and/or
d3e9d7
# modify it under the terms of the GNU General Public License as
d3e9d7
# published by the Free Software Foundation; either version 2 of the
d3e9d7
# License, or (at your option) any later version.
d3e9d7
# 
d3e9d7
# This program is distributed in the hope that it will be useful, but
d3e9d7
# WITHOUT ANY WARRANTY; without even the implied warranty of
d3e9d7
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
d3e9d7
# General Public License for more details.
d3e9d7
#
d3e9d7
# You should have received a copy of the GNU General Public License
d3e9d7
# along with this program; if not, write to the Free Software
d3e9d7
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
d3e9d7
# USA.
d3e9d7
# 
d3e9d7
# ----------------------------------------------------------------------
d3e9d7
# $Id$
d3e9d7
# ----------------------------------------------------------------------
d3e9d7
d3e9d7
function help_updateOutputFileHtml {
d3e9d7
d3e9d7
    # Output action message
d3e9d7
    cli_printMessage "`gettext "Updating manual's html output"`" 'AsResponseLine'
d3e9d7
d3e9d7
    # Check html output directory
d3e9d7
    [[ ! -d ${MANUALS_DIR[4]} ]] && mkdir -p ${MANUALS_DIR[4]}
d3e9d7
d3e9d7
    # Add html output directory into directory stack to make it the
d3e9d7
    # current working directory. Otherwise texi2html may produce
d3e9d7
    # incorrect paths to images included.
d3e9d7
    pushd ${MANUALS_DIR[4]} > /dev/null
d3e9d7
d3e9d7
    # Update html files.  Use texi2html to export from texinfo file
d3e9d7
    # format to html using CentOS Web default visual style.
d3e9d7
    texi2html ${MANUALS_FILE[1]} --output=${MANUALS_DIR[4]} --split section \
d3e9d7
        --nosec-nav \
d3e9d7
        --css-include=/home/centos/artwork/trunk/Identity/Models/Css/Texi2html/stylesheet.css \
d3e9d7
        -I=/home/centos/artwork
d3e9d7
d3e9d7
    # Apply html transformations. Html transformations rely on
d3e9d7
    # Texi2html default html output. The main goal of these html
d3e9d7
    # transformations is to build specific html structures that match
d3e9d7
    # specific css definitions. This way we extend the visual style of
d3e9d7
    # Texi2html default html output.
d3e9d7
    sed -r -i \
d3e9d7
        -f /home/centos/artwork/trunk/Identity/Models/Css/Texi2html/transformations.sed \
d3e9d7
        ${MANUALS_DIR[4]}/*.html
d3e9d7
d3e9d7
    # Remove html output directory from directory stack.
d3e9d7
    popd > /dev/null
d3e9d7
d3e9d7
}