|
Alain Reguera Delgado |
8f60cb |
#!/bin/bash
|
|
Alain Reguera Delgado |
8f60cb |
#
|
|
Alain Reguera Delgado |
8f60cb |
# texinfo_updateOutputFiles.sh -- This function exports documentation
|
|
Alain Reguera Delgado |
8f60cb |
# manual to different output formats.
|
|
Alain Reguera Delgado |
8f60cb |
#
|
|
Alain Reguera Delgado |
8f60cb |
# Copyright (C) 2009-2013 The CentOS Project
|
|
Alain Reguera Delgado |
8f60cb |
#
|
|
Alain Reguera Delgado |
8f60cb |
# This program is free software; you can redistribute it and/or modify
|
|
Alain Reguera Delgado |
8f60cb |
# it under the terms of the GNU General Public License as published by
|
|
Alain Reguera Delgado |
8f60cb |
# the Free Software Foundation; either version 2 of the License, or (at
|
|
Alain Reguera Delgado |
8f60cb |
# your option) any later version.
|
|
Alain Reguera Delgado |
8f60cb |
#
|
|
Alain Reguera Delgado |
8f60cb |
# This program is distributed in the hope that it will be useful, but
|
|
Alain Reguera Delgado |
8f60cb |
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Alain Reguera Delgado |
8f60cb |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Alain Reguera Delgado |
8f60cb |
# General Public License for more details.
|
|
Alain Reguera Delgado |
8f60cb |
#
|
|
Alain Reguera Delgado |
8f60cb |
# You should have received a copy of the GNU General Public License
|
|
Alain Reguera Delgado |
8f60cb |
# along with this program; if not, write to the Free Software
|
|
Alain Reguera Delgado |
8f60cb |
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
Alain Reguera Delgado |
8f60cb |
#
|
|
Alain Reguera Delgado |
8f60cb |
# ----------------------------------------------------------------------
|
|
Alain Reguera Delgado |
8f60cb |
# $Id$
|
|
Alain Reguera Delgado |
8f60cb |
# ----------------------------------------------------------------------
|
|
Alain Reguera Delgado |
8f60cb |
|
|
Alain Reguera Delgado |
8f60cb |
function texinfo_updateOutputFiles {
|
|
Alain Reguera Delgado |
8f60cb |
|
|
Alain Reguera Delgado |
8f60cb |
# Verify manual base file. We can update manual outputs only if
|
|
Alain Reguera Delgado |
8f60cb |
# its base file exists. For example, we cannot update manual
|
|
Alain Reguera Delgado |
8f60cb |
# outputs if the manual has been deleted previously.
|
|
Alain Reguera Delgado |
8f60cb |
if [[ ! -a ${MANUAL_BASEFILE}.${MANUAL_EXTENSION} ]];then
|
|
Alain Reguera Delgado |
8f60cb |
return
|
|
Alain Reguera Delgado |
8f60cb |
fi
|
|
Alain Reguera Delgado |
8f60cb |
|
|
Alain Reguera Delgado |
8f60cb |
# Verify output directory.
|
|
Alain Reguera Delgado |
8f60cb |
if [[ ! -d $(dirname $MANUAL_OUTPUT_BASEFILE) ]];then
|
|
Alain Reguera Delgado |
8f60cb |
mkdir -p $(dirname $MANUAL_OUTPUT_BASEFILE)
|
|
Alain Reguera Delgado |
8f60cb |
fi
|
|
Alain Reguera Delgado |
8f60cb |
|
|
Alain Reguera Delgado |
8f60cb |
# Move script execution to manuals base directory in order for
|
|
Alain Reguera Delgado |
8f60cb |
# makeinfo to produce content correctly. This is the location
|
|
Alain Reguera Delgado |
8f60cb |
# where the documentation's main definition file is stored in.
|
|
Alain Reguera Delgado |
8f60cb |
# Related content outside this location is accessible through
|
|
Alain Reguera Delgado |
8f60cb |
# symbolic links.
|
|
Alain Reguera Delgado |
8f60cb |
pushd ${MANUAL_BASEDIR_L10N} > /dev/null
|
|
Alain Reguera Delgado |
8f60cb |
|
|
Alain Reguera Delgado |
8f60cb |
# Verify existence of link to Licenses information.
|
|
Alain Reguera Delgado |
8f60cb |
texinfo_updateLicenseLink
|
|
Alain Reguera Delgado |
8f60cb |
|
|
Alain Reguera Delgado |
8f60cb |
# Keep the order in which these actions are performed. Begin with
|
|
Alain Reguera Delgado |
8f60cb |
# actions that use the makeinfo file to realize the export. Later,
|
|
Alain Reguera Delgado |
8f60cb |
# continue with action that need other tools to realize the export
|
|
Alain Reguera Delgado |
8f60cb |
# (e.g., texi2html to produce XHTML and texi2pdf to produce PDF
|
|
Alain Reguera Delgado |
8f60cb |
# outputs).
|
|
Alain Reguera Delgado |
8f60cb |
texinfo_updateOutputFileInfo
|
|
Alain Reguera Delgado |
8f60cb |
texinfo_updateOutputFileXml
|
|
Alain Reguera Delgado |
8f60cb |
texinfo_updateOutputFileDocbook
|
|
Alain Reguera Delgado |
8f60cb |
texinfo_updateOutputFilePlaintext
|
|
Alain Reguera Delgado |
8f60cb |
texinfo_updateOutputFileXhtml
|
|
Alain Reguera Delgado |
8f60cb |
texinfo_updateOutputFilePdf
|
|
Alain Reguera Delgado |
8f60cb |
|
|
Alain Reguera Delgado |
8f60cb |
# Remove the working copy root directory from directory stack.
|
|
Alain Reguera Delgado |
8f60cb |
popd > /dev/null
|
|
Alain Reguera Delgado |
8f60cb |
|
|
Alain Reguera Delgado |
8f60cb |
}
|