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

d3e9d7
#!/bin/bash
d3e9d7
#
d3e9d7
# help_updateOutputFileInfo.sh -- This function updates manual's info
d3e9d7
# output related file.
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_updateOutputFileInfo {
d3e9d7
d3e9d7
    # Output action message.
d3e9d7
    cli_printMessage "`gettext "Updating manual's info output"`" 'AsResponseLine'
d3e9d7
d3e9d7
    # Check info output directory.
d3e9d7
    [[ ! -d ${MANUALS_DIR[3]} ]] &&  mkdir -p ${MANUALS_DIR[3]}
d3e9d7
d3e9d7
    # Update info file.
da73e7
    /usr/bin/makeinfo ${MANUALS_FILE[1]} --output=${MANUALS_FILE[4]}
d3e9d7
d3e9d7
    # Check info file. If the info file was not created then there are
d3e9d7
    # errors to fix.
d3e9d7
    if [[ ! -f ${MANUALS_FILE[4]} ]];then
d3e9d7
        cli_printMessage "$(caller)" "AsToKnowMoreLine"
d3e9d7
    fi
d3e9d7
d3e9d7
    # Compress info file.
d3e9d7
    bzip2 -f ${MANUALS_FILE[4]}
d3e9d7
d3e9d7
}