diff --git a/Scripts/Functions/Help/Backends/Docbook/Templates/manual-appendix.docbook b/Scripts/Functions/Help/Backends/Docbook/Templates/manual-appendix.docbook
new file mode 100644
index 0000000..056b9b4
--- /dev/null
+++ b/Scripts/Functions/Help/Backends/Docbook/Templates/manual-appendix.docbook
@@ -0,0 +1,8 @@
+
+
+
+ =TITLE=
+
+ =LIST_OF_ENTITIES=
+
+
diff --git a/Scripts/Functions/Help/Backends/Docbook/Templates/manual-chapter.docbook b/Scripts/Functions/Help/Backends/Docbook/Templates/manual-chapter.docbook
new file mode 100644
index 0000000..88d4e0e
--- /dev/null
+++ b/Scripts/Functions/Help/Backends/Docbook/Templates/manual-chapter.docbook
@@ -0,0 +1,8 @@
+
+
+
+ =TITLE=
+
+ =LIST_OF_ENTITIES=
+
+
diff --git a/Scripts/Functions/Help/Backends/Docbook/Templates/manual-sect1.docbook b/Scripts/Functions/Help/Backends/Docbook/Templates/manual-sect1.docbook
new file mode 100644
index 0000000..46c44c0
--- /dev/null
+++ b/Scripts/Functions/Help/Backends/Docbook/Templates/manual-sect1.docbook
@@ -0,0 +1,8 @@
+
+
+
+ =TITLE=
+
+ ...
+
+
diff --git a/Scripts/Functions/Help/Backends/Docbook/Templates/manual.docbook b/Scripts/Functions/Help/Backends/Docbook/Templates/manual.docbook
new file mode 100644
index 0000000..2e9c7ee
--- /dev/null
+++ b/Scripts/Functions/Help/Backends/Docbook/Templates/manual.docbook
@@ -0,0 +1,12 @@
+
+
+
+
+&book-preamble;
+&book-parts;
+
diff --git a/Scripts/Functions/Help/Backends/Texinfo/Templates/manual-chapter-intro.texi b/Scripts/Functions/Help/Backends/Texinfo/Templates/manual-chapter-intro.texi
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Scripts/Functions/Help/Backends/Texinfo/Templates/manual-chapter-intro.texi
diff --git a/Scripts/Functions/Help/Backends/Texinfo/Templates/manual-copyright-cc-by-sa.texi b/Scripts/Functions/Help/Backends/Texinfo/Templates/manual-copyright-cc-by-sa.texi
new file mode 100755
index 0000000..9ec8135
--- /dev/null
+++ b/Scripts/Functions/Help/Backends/Texinfo/Templates/manual-copyright-cc-by-sa.texi
@@ -0,0 +1,8 @@
+Copyright @copyright{} =COPYRIGHT_YEAR_LIST= =COPYRIGHT_HOLDER=
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the a Creative Commons Attribution–Share Alike 3.0
+Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available
+at @url{http://creativecommons.org/licenses/by-sa/3.0/}. In accordance
+with CC-BY-SA, if you distribute this document or an adaptation of it,
+you must provide the URL for the original version.
diff --git a/Scripts/Functions/Help/Backends/Texinfo/Templates/manual-copyright-gfdl.texi b/Scripts/Functions/Help/Backends/Texinfo/Templates/manual-copyright-gfdl.texi
new file mode 100755
index 0000000..1a67c65
--- /dev/null
+++ b/Scripts/Functions/Help/Backends/Texinfo/Templates/manual-copyright-gfdl.texi
@@ -0,0 +1,8 @@
+Copyright @copyright{} =COPYRIGHT_YEAR_LIST= =COPYRIGHT_HOLDER=
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
+copy of the license is included in the section entitled ``GNU Free
+Documentation License''.
diff --git a/Scripts/Functions/Help/Backends/Texinfo/Templates/manual-index.texi b/Scripts/Functions/Help/Backends/Texinfo/Templates/manual-index.texi
new file mode 100644
index 0000000..abe002c
--- /dev/null
+++ b/Scripts/Functions/Help/Backends/Texinfo/Templates/manual-index.texi
@@ -0,0 +1,3 @@
+@node Index
+@unnumbered Index
+@printindex cp
diff --git a/Scripts/Functions/Help/Backends/Texinfo/Templates/manual-menu.texi b/Scripts/Functions/Help/Backends/Texinfo/Templates/manual-menu.texi
new file mode 100644
index 0000000..70362c8
--- /dev/null
+++ b/Scripts/Functions/Help/Backends/Texinfo/Templates/manual-menu.texi
@@ -0,0 +1,3 @@
+@menu
+* Index::
+@end menu
diff --git a/Scripts/Functions/Help/Backends/Texinfo/Templates/manual-nodes.texi b/Scripts/Functions/Help/Backends/Texinfo/Templates/manual-nodes.texi
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Scripts/Functions/Help/Backends/Texinfo/Templates/manual-nodes.texi
diff --git a/Scripts/Functions/Help/Backends/Texinfo/Templates/manual-section-functions.texi b/Scripts/Functions/Help/Backends/Texinfo/Templates/manual-section-functions.texi
new file mode 100644
index 0000000..9071086
--- /dev/null
+++ b/Scripts/Functions/Help/Backends/Texinfo/Templates/manual-section-functions.texi
@@ -0,0 +1,35 @@
+@subheading Name
+
+@dots{}
+
+@subheading Synopsis
+
+@dots{}
+
+@subheading Description
+
+@dots{}
+
+@subheading Examples
+
+@dots{}
+
+@subheading Author
+
+Written by @dots{}
+
+@subheading Reporting bugs
+
+Report bugs to @email{centos-artwork@@centos.org} mailing list.
+
+@subheading Copyright
+
+Copyright @copyright{} =COPYRIGHT_YEAR_LIST= =COPYRIGHT_HOLDER=
+
+This is free software. You may redistribute copies of it under the
+terms of the GNU General Public License (@pxref{GNU General Public
+License}). There is NO WARRANTY, to the extent permitted by law.
+
+@subheading See also
+
+=TEXINFO_SEEALSO=
diff --git a/Scripts/Functions/Help/Backends/Texinfo/Templates/manual-section.texi b/Scripts/Functions/Help/Backends/Texinfo/Templates/manual-section.texi
new file mode 100644
index 0000000..d6bb628
--- /dev/null
+++ b/Scripts/Functions/Help/Backends/Texinfo/Templates/manual-section.texi
@@ -0,0 +1,23 @@
+@subheading Goals
+
+@itemize
+@item ...
+@end itemize
+
+@subheading Description
+
+@itemize
+@item ...
+@end itemize
+
+@subheading Usage
+
+@itemize
+@item ...
+@end itemize
+
+@subheading See also
+
+@itemize
+@item ...
+@end itemize
diff --git a/Scripts/Functions/Help/Backends/Texinfo/Templates/manual.texi b/Scripts/Functions/Help/Backends/Texinfo/Templates/manual.texi
new file mode 100644
index 0000000..3d05184
--- /dev/null
+++ b/Scripts/Functions/Help/Backends/Texinfo/Templates/manual.texi
@@ -0,0 +1,55 @@
+\input texinfo @c -*-texinfo-*-
+@c $Id$
+@c -- Header --------------------------------------------------
+
+@setfilename =FILENAME=.info
+@settitle =TITLE=
+@documentlanguage =LOCALE_LL=
+@afourpaper
+@finalout
+
+@c -- Summary description and copyright -----------------------
+
+@copying
+=DESCRIPTION=
+
+Copyright @copyright{} =COPYRIGHT_YEAR= =COPYRIGHT_HOLDER=
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
+copy of the license is included in the section entitled GNU Free
+Documentation License.
+@end copying
+
+@c -- Titlepage, contents, copyright ---------------------------
+
+@titlepage
+@title =TITLE=
+@subtitle =SUBTITLE=
+@author =AUTHOR=
+@page
+@vskip 0pt plus 1filll
+@insertcopying
+@end titlepage
+@contents
+
+@c -- `Top' node and master menu -------------------------------
+
+@ifnottex
+@node Top
+@top =TITLE=
+@insertcopying
+@end ifnottex
+@include manual-menu.texi
+
+@c -- The body of the document --------------------------------
+
+@include manual-nodes.texi
+
+@c -- The end of the document ---------------------------------
+
+@include manual-index.texi
+
+@bye
diff --git a/Scripts/Functions/Help/Backends/Texinfo/texinfo_copyEntry.sh b/Scripts/Functions/Help/Backends/Texinfo/texinfo_copyEntry.sh
new file mode 100755
index 0000000..20c29cb
--- /dev/null
+++ b/Scripts/Functions/Help/Backends/Texinfo/texinfo_copyEntry.sh
@@ -0,0 +1,82 @@
+#!/bin/bash
+#
+# texinfo_copyEntry.sh -- This function copies documentation entries and
+# updates documentation structure to reflect changes.
+#
+# Copyright (C) 2009, 2010, 2011 The CentOS Project
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# ----------------------------------------------------------------------
+# $Id$
+# ----------------------------------------------------------------------
+
+function texinfo_copyEntry {
+
+ # Print separator line.
+ cli_printMessage '-' --as-separator-line
+
+ local ENTRY_SRC="$ENTRY"
+ local ENTRIES=''
+ local ENTRY=''
+
+ # Verify parent directory of entry destination. If its parent
+ # directory doesn't exist, create it and add it to the repository.
+ if [[ ! -d $(dirname ${ENTRY_DST}) ]];then
+ mkdir -p $(dirname ${ENTRY_DST})
+ svn add $(dirname ${ENTRY_DST}) --quiet
+ fi
+
+ # Copy main documentation entry.
+ if [[ -a ${ENTRY_SRC} ]] && [[ ! -a ${ENTRY_DST} ]];then
+ cli_printMessage "${ENTRY_DST}" --as-creating-line
+ svn cp "${ENTRY_SRC}" "${ENTRY_DST}" --quiet
+ fi
+
+ # Define target location of directory holding dependent
+ # documentation entries.
+ ENTRY_DST=$(echo ${ENTRY_DST} | sed -r 's!\.texi$!!')
+
+ # Copy dependent documentation entries, if any.
+ if [[ -d ${ENTRY_DIR}/${ENTRY_FILE} ]] && [[ ! -d ${ENTRY_DST} ]];then
+ cli_printMessage "${ENTRY_DST}" --as-creating-line
+ svn cp "${ENTRY_DIR}/${ENTRY_FILE}" "${ENTRY_DST}" --quiet
+ fi
+
+ # Define list of files to process.
+ ENTRIES=$(cli_getFilesList $(dirname ${ENTRY_DST}) --pattern=".*$(basename ${ENTRY_DST}).*\.texi")
+
+ # Print separator line.
+ cli_printMessage '-' --as-separator-line
+
+ # Print action message.
+ cli_printMessage "Updating menus, nodes and cross-references." --as-response-line
+
+ # Redefine ENTRY variable in order to update documentation
+ # structure, taking recently created entries as reference.
+ for ENTRY in ${ENTRIES};do
+
+ # Update menu and node definitions from manual sections to
+ # reflect the changes.
+ texinfo_updateMenu
+ texinfo_updateNodes
+
+ # Update cross reference definitions from manual to reflect
+ # the changes.
+ texinfo_restoreCrossReferences
+
+ done
+
+}
diff --git a/Scripts/Functions/Help/Backends/Texinfo/texinfo_deleteCrossReferences.sh b/Scripts/Functions/Help/Backends/Texinfo/texinfo_deleteCrossReferences.sh
new file mode 100755
index 0000000..9472000
--- /dev/null
+++ b/Scripts/Functions/Help/Backends/Texinfo/texinfo_deleteCrossReferences.sh
@@ -0,0 +1,90 @@
+#!/bin/bash
+#
+# texinfo_deleteCrossReferences.sh -- This function looks inside
+# texinfo source files, from section level on, and removes all cross
+# referece definitions related to a documentation entry. Use this
+# function in coordination with texinfo_deleteEntry function, in order
+# to keep cross reference information, inside the documentation
+# manual, syncronized.
+#
+# Copyright (C) 2009, 2010, 2011 The CentOS Project
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# ----------------------------------------------------------------------
+# $Id$
+# ----------------------------------------------------------------------
+
+function texinfo_deleteCrossReferences {
+
+ local -a PATTERN
+ local -a REPLACE
+ local LOCATION=''
+
+ # Define entry location. Verify first argument to make this
+ # function reusable. If no value is passed as first argument use
+ # entry global information value as default value instead.
+ if [[ "$1" != '' ]];then
+ LOCATION="$1"
+ else
+ LOCATION="$ENTRY"
+ fi
+
+ # Build the node string using entry location.
+ local NODE=$(echo "$LOCATION" \
+ | cut -d / -f8- \
+ | tr '/' ' ' \
+ | sed -r \
+ -e "s/(chapter-intro\.texi|\.texi)$//" \
+ -e 's! !( |\\n)!g')
+
+ # Define regular expression patterns for texinfo cross reference
+ # commands.
+ PATTERN[0]="@(pxref|xref|ref)\{(${NODE})\}"
+ PATTERN[1]="^(\* ${NODE}:(.*)?:(.*)?)$"
+
+ # Define replacement string for missing entries. It is convenient
+ # to keep missing entries in documentation for documentation team
+ # to know. Removing the missing cross reference may intorudce
+ # confussion. Imagine that! you are spending lots of hours in an
+ # article and suddenly one of your cross refereces disappears with
+ # no visible reason, with the next working copy update you
+ # perform. That's frustrating. Instead, when centos-art.sh script
+ # finds a missing cross reference it removes the link and remark
+ # the issue for you to act on it.
+ REPLACE[0]='--- @strong{'`gettext "Removed"`'}(\1:\2) ---'
+ REPLACE[1]='@comment --- '`gettext "Removed"`'(\1) ---'
+
+ # Define list of entries to process.
+ local ENTRIES=$(cli_getFilesList ${MANUAL_BASEDIR} --pattern='.*\.texi')
+
+ # Update node-related cross references. The node-related cross
+ # reference definition, long ones specially, could require more
+ # than one line to be set. By default, GNU sed does not matches
+ # newline characters in the pattern space, so we need to make use
+ # of `label' feature and the `N' command in order to build a
+ # pattern space that includes the newline character in it. Here we
+ # use the `a' letter to name the label we use, followed by N
+ # command to add a newline to the pattern space, the s command to
+ # make the pattern replacement using the `g' flag to make it
+ # global and finaly the command `b' to branch label named `a'.
+ sed -r -i ":a;N;s!${PATTERN[0]}!${REPLACE[0]}!g;ba" ${ENTRIES}
+
+ # Update menu-related cross references. Menu-related cross
+ # references hardly appear in more than one line, so there is no
+ # need to complicate the replacement command.
+ sed -r -i "s!${PATTERN[1]}!${REPLACE[1]}!" ${ENTRIES}
+
+}
diff --git a/Scripts/Functions/Help/Backends/Texinfo/texinfo_deleteEntry.sh b/Scripts/Functions/Help/Backends/Texinfo/texinfo_deleteEntry.sh
new file mode 100755
index 0000000..140796e
--- /dev/null
+++ b/Scripts/Functions/Help/Backends/Texinfo/texinfo_deleteEntry.sh
@@ -0,0 +1,109 @@
+#!/bin/bash
+#
+# texinfo_deleteEntry.sh -- This function removes a documentation entry
+# from documentation directory structure.
+#
+# Copyright (C) 2009, 2010, 2011 The CentOS Project
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# ----------------------------------------------------------------------
+# $Id$
+# ----------------------------------------------------------------------
+
+function texinfo_deleteEntry {
+
+ # Print separator line.
+ cli_printMessage '-' --as-separator-line
+
+ local ENTRY_SRC=${ENTRY}
+ local ENTRIES=''
+ local ENTRY=''
+ local ENTRY_DEP=''
+
+ # Initiate list of entries to remove using the entry specified in
+ # the command line.
+ ENTRIES=${ENTRY_SRC}
+
+ # Verify existence of dependent entries. Dependent entries are
+ # stored inside a directory with the same name of the entry you
+ # are trying to remove.
+ if [[ -d ${ENTRY_DIR}/${ENTRY_FILE} ]];then
+
+ # Add dependent files to list of entries.
+ ENTRIES="${ENTRIES} $(cli_getFilesList ${ENTRY_DIR}/${ENTRY_FILE} --pattern=".*\.texi")"
+
+ # Add dependent directories to list of entries. Be aware of
+ # nested directories.
+ for ENTRY in ${ENTRIES};do
+ ENTRY_DEP=$(echo $ENTRY | sed -r "s/\.texi$//")
+ if [[ -d $ENTRY_DEP ]];then
+ ENTRIES="${ENTRIES} ${ENTRY_DEP}"
+ fi
+ done
+
+ fi
+
+ # Prepare list of entries for action preamble.
+ ENTRIES=$(echo ${ENTRIES} | tr ' ' "\n" | sort -r | uniq)
+
+ # Print action preamble.
+ cli_printActionPreamble $ENTRIES --to-delete
+
+ # Remove documentation entry using Subversion's `delete' command
+ # to know when the action took place. Do not use regular `rm'
+ # command here.
+ svn del ${ENTRIES} --quiet
+
+ # Verify exit status from subversion command to be sure everything
+ # went well. Otherwhise stop script execution.
+ if [[ $? -ne 0 ]];then
+ cli_printMessage "${FUNCDIRNAM}" --as-toknowmore-line
+ fi
+
+ # Print separator line.
+ cli_printMessage '-' --as-separator-line
+
+ # Print action message.
+ cli_printMessage "Updating menus, nodes and cross-references." '--as-response-line'
+
+ # Process list of entries in order to update menus, nodes and
+ # cross references. Since we are verifying entry status before
+ # remove the we cannot update the information in the same loop we
+ # remove files. This would modify some file before be removed and
+ # that would stop script execution. Similary, if we do update
+ # menus, nodes and cross references before removing files it would
+ # be needed to remove farther status verification in order for the
+ # script to continue its execution. Thereby, I can't see a
+ # different way but removing files first using status verification
+ # and later go through entries list again to update menus, nodes
+ # and cross references in remaining files.
+ for ENTRY in ${ENTRIES};do
+
+ # Update menu and node definitions from manual sections to
+ # reflect the changes.
+ texinfo_updateMenu "remove-entry"
+ texinfo_updateNodes
+
+ # Update cross reference definitions from manual to reflect
+ # the changes.
+ texinfo_deleteCrossReferences
+
+ done
+
+ # Rebuild output files to propagate recent changes.
+ texinfo_updateOutputFiles
+
+}
diff --git a/Scripts/Functions/Help/Backends/Texinfo/texinfo_editEntry.sh b/Scripts/Functions/Help/Backends/Texinfo/texinfo_editEntry.sh
new file mode 100755
index 0000000..312682d
--- /dev/null
+++ b/Scripts/Functions/Help/Backends/Texinfo/texinfo_editEntry.sh
@@ -0,0 +1,87 @@
+#!/bin/bash
+#
+# texinfo_editEntry.sh -- This function implements the edition flow of
+# documentation entries inside the working copy.
+#
+# Copyright (C) 2009, 2010, 2011 The CentOS Project
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# ----------------------------------------------------------------------
+# $Id$
+# ----------------------------------------------------------------------
+
+function texinfo_editEntry {
+
+ # Print separator line.
+ cli_printMessage '-' --as-separator-line
+
+ # Verify chapter definition inside manual.
+ if [[ ! -d $MANUAL_CHAPTER_DIR ]];then
+
+ # Print confirmation question.
+ cli_printMessage "`gettext "The following documentation chapter will be created:"`"
+ cli_printMessage "$MANUAL_CHAPTER_DIR" --as-response-line
+ cli_printMessage "`gettext "Do you want to continue?"`" --as-yesornorequest-line
+
+ # Update manual chapter related files.
+ texinfo_updateChaptersFiles
+
+ # Update manual chapter related menu.
+ texinfo_updateChaptersMenu
+
+ # Update manual chapter related nodes (based on chapter
+ # related menu).
+ texinfo_updateChaptersNodes
+
+ fi
+
+ # Verify section definition inside chapters.
+ if [[ ! -f $ENTRY ]];then
+
+ # Print confirmation question.
+ cli_printMessage "`gettext "The following documentation section will be created:"`"
+ cli_printMessage "$ENTRY" --as-response-line
+ cli_printMessage "`gettext "Do you want to continue?"`" --as-yesornorequest-line
+
+ # Update chapter section related menu.
+ texinfo_updateMenu
+
+ # Update chapter section related nodes (based on chapter
+ # section related menu).
+ texinfo_updateNodes
+
+ # Update old missing cross references. If for some reason a
+ # documentation entry is removed by mistake, and that mistake
+ # is fixing by adding the removed documentation entry back
+ # into the repository, rebuild the missing cross reference
+ # message to use the correct link to the documentation
+ # section.
+ texinfo_restoreCrossReferences
+
+ else
+
+ # Print action message.
+ cli_printMessage "$ENTRY" --as-updating-line
+
+ fi
+
+ # Use default text editor to edit the documentation entry.
+ eval $EDITOR $ENTRY
+
+ # Rebuild output files to propagate recent changes.
+ texinfo_updateOutputFiles
+
+}
diff --git a/Scripts/Functions/Help/Backends/Texinfo/texinfo_getEntry.sh b/Scripts/Functions/Help/Backends/Texinfo/texinfo_getEntry.sh
new file mode 100755
index 0000000..53a4ca2
--- /dev/null
+++ b/Scripts/Functions/Help/Backends/Texinfo/texinfo_getEntry.sh
@@ -0,0 +1,69 @@
+#!/bin/bash
+#
+# texinfo_getEntry.sh -- This function builds a documentation entry based
+# on a location specified. Location specification can be both action
+# value (ACTIONVAL) variable or a value passed as first positional
+# parameter.
+#
+# Copyright (C) 2009, 2010, 2011 The CentOS Project
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# ----------------------------------------------------------------------
+# $Id$
+# ----------------------------------------------------------------------
+
+function texinfo_getEntry {
+
+ # Define variables as local to avoid conflicts outside.
+ local ENTRY=''
+ local LOCATION=''
+
+ # Redefine location in order to make this function reusable not
+ # just for action value variable but whatever value passed as
+ # first possitional argument.
+ if [[ "$1" != '' ]];then
+ LOCATION="$1"
+ else
+ LOCATION="$ACTIONVAL"
+ fi
+
+ # Define relative path of entry, from trunk directory on.
+ ENTRY=$(echo $LOCATION | sed -r "s!^${HOME}/artwork/!!")
+
+ # Verify the entry relative path to find out which documentation
+ # manual we are acting on. As convenction, whatever documentation
+ # entry you provide outside trunk/Manuals/ directory structure is
+ # considered as you are documenting the repository directory
+ # structure. Otherwise, if an entry inside trunk/Manuals/ is
+ # provided, the directory structure provided is used as default
+ # documentation manual for actions like `--create' and `--update'
+ # to take place on. Other options like `--edit', `--delete' and
+ # `--read' cannot be applied to paths provided inside
+ # trunk/Manuals/ such actions need to be performed manually.
+ if [[ ${ENTRY} =~ '\.texi$' ]];then
+ ENTRY=$(echo ${ENTRY} | sed 's!trunk/Manuals/!!')
+ else
+ ENTRY=$(dirname Directories/${ENTRY})/$(basename $LOCATION).texi
+ fi
+
+ # Re-define entry to set absolute path to manuals base directory
+ # structure.
+ ENTRY=${MANUAL_BASEDIR}/${ENTRY}
+
+ # Output entry's absolute path.
+ echo ${ENTRY}
+
+}
diff --git a/Scripts/Functions/Help/Backends/Texinfo/texinfo_getNode.sh b/Scripts/Functions/Help/Backends/Texinfo/texinfo_getNode.sh
new file mode 100755
index 0000000..6773769
--- /dev/null
+++ b/Scripts/Functions/Help/Backends/Texinfo/texinfo_getNode.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+#
+# texinfo_getNode.sh -- This function cleans up the action value
+# (ACTIONVAL) directory to make a node name from it.
+#
+# Copyright (C) 2009, 2010, 2011 The CentOS Project
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# ----------------------------------------------------------------------
+# $Id$
+# ----------------------------------------------------------------------
+
+function texinfo_getNode {
+
+ local NODE=$(echo "$ACTIONVAL" \
+ | sed -r "s!^${HOME}/artwork/!!" \
+ | sed -r 's!/! !g' | sed -r 's!^[[:space:]]+!!')
+
+ echo "$NODE"
+}
+
diff --git a/Scripts/Functions/Help/Backends/Texinfo/texinfo_makeSeeAlso.sh b/Scripts/Functions/Help/Backends/Texinfo/texinfo_makeSeeAlso.sh
new file mode 100755
index 0000000..b2e6b6e
--- /dev/null
+++ b/Scripts/Functions/Help/Backends/Texinfo/texinfo_makeSeeAlso.sh
@@ -0,0 +1,70 @@
+#!/bin/bash
+#
+# texinfo_makeSeeAlso.sh -- This function creates an itemized list
+# of links to refer parent documentation entries. This list of links
+# is expanded wherever the =TEXINFO_SEEALSO= translation marker be
+# placed in the documentation entry.
+#
+# Copyright (C) 2009, 2010, 2011 The CentOS Project
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# ----------------------------------------------------------------------
+# $Id$
+# ----------------------------------------------------------------------
+
+function texinfo_makeSeeAlso {
+
+ local FILE="$1"
+ local NODE="$2"
+ local NODECOMP=''
+ local NODECOMPS_TOTAL=''
+ local -a NODECOMPS
+ local SEEALSO_LIST=''
+
+ # Stript out the node information in order to retrive its
+ # components individually.
+ for NODECOMP in $(echo $NODE);do
+ NODECOMPS[((++${#NODECOMPS[*]}))]=$NODECOMP
+ done
+
+ # Define how many components does the node have.
+ local NODECOMPS_TOTAL=$((${#NODECOMPS[*]}))
+
+ # Define the list content. This list should contain all the parent
+ # documentation entries under the same chapter, using the current
+ # documentation entry as reference. Assuming no parent directory
+ # exist for the current documentation entry, print just one item
+ # with three dots as content so as to let the user deside what the
+ # most appropriate content for this section would be.
+ if [[ $NODECOMPS_TOTAL -gt 2 ]];then
+ SEEALSO_LIST=$(\
+ until [[ ${NODECOMPS_TOTAL} -eq 2 ]];do
+ echo "@item @ref{$NODE" \
+ | cut -d ' ' -f-"$NODECOMPS_TOTAL" \
+ | sed -r -e 's!^[:space:]*!\\n!' -e 's!$!}!';
+ NODECOMPS_TOTAL=$(($NODECOMPS_TOTAL - 1))
+ done)
+ else
+ SEEALSO_LIST=$(echo "@item @dots{}")
+ fi
+
+ # Define the list type and merge its content.
+ SEEALSO_LIST="$(echo '@itemize'$SEEALSO_LIST'\n@end itemize')"
+
+ # Expand translation marker in the documentation entry.
+ sed -i -e "/=TEXINFO_SEEALSO=/c\\$SEEALSO_LIST" $FILE
+
+}
diff --git a/Scripts/Functions/Help/Backends/Texinfo/texinfo_renameCrossReferences.sh b/Scripts/Functions/Help/Backends/Texinfo/texinfo_renameCrossReferences.sh
new file mode 100755
index 0000000..4f706f9
--- /dev/null
+++ b/Scripts/Functions/Help/Backends/Texinfo/texinfo_renameCrossReferences.sh
@@ -0,0 +1,70 @@
+#!/bin/bash
+#
+# texinfo_renameCrossReferences.sh -- This function replaces a node
+# pattern with a node replacement and updates cross-reference
+# definitions to reflect the changes.
+#
+# Copyright (C) 2009, 2010, 2011 The CentOS Project
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# ----------------------------------------------------------------------
+# $Id$
+# ----------------------------------------------------------------------
+
+function texinfo_renameCrossReferences {
+
+ local NODE=''
+ local COUNT=1
+ local ENTRIES=''
+ local NODE_SRC=''
+ local NODE_DST=''
+
+ # Define node pattern for source documenation entry.
+ NODE_SRC=$(echo "$ENTRY" \
+ | cut -d / -f8- \
+ | tr '/' ' ' \
+ | sed -r \
+ -e "s/(chapter-intro\.texi|\.texi)$//")
+
+ # Define node replacement for target documentation entry.
+ NODE_DST=$(echo "$ENTRY_DST" \
+ | cut -d / -f8- \
+ | tr '/' ' ' \
+ | sed -r \
+ -e "s/(chapter-intro\.texi|\.texi)$//")
+
+ # Define list of entries to process.
+ ENTRIES=$(cli_getFilesList ${MANUAL_BASEDIR} --pattern='.*\.texi')
+
+ # Update node-related cross-references. The node-related cross
+ # reference definition, long ones specially, could require more
+ # than one line to be set. By default, GNU sed does not matches
+ # newline characters in the pattern space, so we need to make use
+ # of `label' feature and the `N' command in order to build a
+ # pattern space that includes the newline character in it. Here we
+ # use the `a' letter to name the label we use, followed by N
+ # command to add a newline to the pattern space, the s command to
+ # make the pattern replacement using the `g' flag to make it
+ # global and finaly the command `b' to branch label named `a'.
+ sed -r -i ":a;N;s!${NODE_SRC}!${NODE_DST}!g;ba" ${ENTRIES}
+
+ # At this point, source documentation entry has been renamed from
+ # source to target documentation entry, but they are still
+ # commented. So, uncomment them restoring target documentation
+ # entries.
+ texinfo_restoreCrossReferences "${ENTRY_DST}"
+
+}
diff --git a/Scripts/Functions/Help/Backends/Texinfo/texinfo_renameEntry.sh b/Scripts/Functions/Help/Backends/Texinfo/texinfo_renameEntry.sh
new file mode 100755
index 0000000..43bf04e
--- /dev/null
+++ b/Scripts/Functions/Help/Backends/Texinfo/texinfo_renameEntry.sh
@@ -0,0 +1,42 @@
+#!/bin/bash
+#
+# texinfo_renameEntry.sh -- This function renames documentation entries
+# and updates documentation structure to reflect changes.
+#
+# Copyright (C) 2009, 2010, 2011 The CentOS Project
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# ----------------------------------------------------------------------
+# $Id$
+# ----------------------------------------------------------------------
+
+function texinfo_renameEntry {
+
+ # Copy source documentation entry.
+ texinfo_copyEntry
+
+ # Delete source documentation entry. The source documentation
+ # entry has been copied already, so to create the rename effect
+ # delete it from repository filesystem.
+ texinfo_deleteEntry
+
+ # At this point, source documentation entry has been removed and
+ # all menu, nodes and cross-references have been commented. So,
+ # replace commented menu, nodes and cross-reference information
+ # from source to target documentation entry.
+ texinfo_renameCrossReferences
+
+}
diff --git a/Scripts/Functions/Help/Backends/Texinfo/texinfo_restoreCrossReferences.sh b/Scripts/Functions/Help/Backends/Texinfo/texinfo_restoreCrossReferences.sh
new file mode 100755
index 0000000..fb7016a
--- /dev/null
+++ b/Scripts/Functions/Help/Backends/Texinfo/texinfo_restoreCrossReferences.sh
@@ -0,0 +1,86 @@
+#!/bin/bash
+#
+# texinfo_restoreCrossReferences.sh -- This function looks inside
+# texinfo source files, from section level on, and restores any cross
+# reference related to a documentation entry. This function is used in
+# those cases where documentation entries are created/recreated to
+# documentation structure. It is a verification that looks for
+# matching documentation entries previously defined as removed by
+# texinfo_deleteCrossReferences function. The
+# texinfo_restoreCrossReferences function relays in the removed
+# message format produced by texinfo_deleteCrossReferences
+# function, in order to return them back into the link format.
+#
+# Copyright (C) 2009, 2010, 2011 The CentOS Project
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# ----------------------------------------------------------------------
+# $Id$
+# ----------------------------------------------------------------------
+
+function texinfo_restoreCrossReferences {
+
+ local -a PATTERN
+ local -a REPLACE
+ local LOCATION=''
+
+ # Define entry location. Verify first argument to make this
+ # function reusable. If no value is passed as first argument use
+ # entry global information value as default value instead.
+ if [[ "$1" != '' ]];then
+ LOCATION="$1"
+ else
+ LOCATION="$ENTRY"
+ fi
+
+ # Build the node string using entry location.
+ local NODE=$(echo "$LOCATION" \
+ | cut -d / -f8- \
+ | tr '/' ' ' \
+ | sed -r \
+ -e "s/(chapter-intro\.texi|\.texi)$//")
+
+ # Define regular expression patterns to match removed message
+ # format produced by message_removeCrossReferences function.
+ PATTERN[0]="--- @strong\{`gettext "Removed"`\}\((pxref|xref|ref):(${NODE})\) ---"
+ PATTERN[1]="^@comment --- `gettext "Removed"`\((\* ${NODE}:(.*)?:(.*)?)\) ---$"
+
+ # Define replacement string to turn removed message back to cross
+ # reference link.
+ REPLACE[0]='@\1{\2}'
+ REPLACE[1]='\1'
+
+ # Define list of entries to process.
+ local ENTRIES=$(cli_getFilesList ${MANUAL_BASEDIR} --pattern='.*\.texi')
+
+ # Update node-related cross references. The node-related cross
+ # reference definition, long ones specially, could require more
+ # than one line to be set. By default, GNU sed does not matches
+ # newline characters in the pattern space, so we need to make use
+ # of `label' feature and the `N' command in order to build a
+ # pattern space that includes the newline character in it. Here we
+ # use the `a' letter to name the label we use, followed by N
+ # command to add a newline to the pattern space, the s command to
+ # make the pattern replacement using the `g' flag to make it
+ # global and finaly the command `b' to branch label named `a'.
+ sed -r -i ":a;N;s!${PATTERN[0]}!${REPLACE[0]}!g;ba" ${ENTRIES}
+
+ # Update menu-related cross references. Menu-related cross
+ # references hardly appear in more than one line, so there is no
+ # need to complicate the replacement command.
+ sed -r -i "s!${PATTERN[1]}!${REPLACE[1]}!" ${ENTRIES}
+
+}
diff --git a/Scripts/Functions/Help/Backends/Texinfo/texinfo_searchIndex.sh b/Scripts/Functions/Help/Backends/Texinfo/texinfo_searchIndex.sh
new file mode 100644
index 0000000..b701660
--- /dev/null
+++ b/Scripts/Functions/Help/Backends/Texinfo/texinfo_searchIndex.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+#
+# texinfo_searchIndex.sh -- This function does an index search inside the
+# info document.
+#
+# Copyright (C) 2009, 2010, 2011 The CentOS Project
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# ----------------------------------------------------------------------
+# $Id$
+# ----------------------------------------------------------------------
+
+function texinfo_searchIndex {
+
+ # Print action message.
+ cli_printMessage "${MANUAL_BASEFILE}.info.bz2" --as-reading-line
+
+ # Execute info command to perform an index-search.
+ /usr/bin/info --index-search="$FLAG_SEARCH" --file=${MANUAL_BASEFILE}.info.bz2
+
+}
diff --git a/Scripts/Functions/Help/Backends/Texinfo/texinfo_searchNode.sh b/Scripts/Functions/Help/Backends/Texinfo/texinfo_searchNode.sh
new file mode 100755
index 0000000..abbc91f
--- /dev/null
+++ b/Scripts/Functions/Help/Backends/Texinfo/texinfo_searchNode.sh
@@ -0,0 +1,40 @@
+#!/bin/bash
+#
+# texinfo_searchNode.sh -- This function does a node search inside the
+# info document.
+#
+# Copyright (C) 2009, 2010, 2011 The CentOS Project
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# ----------------------------------------------------------------------
+# $Id$
+# ----------------------------------------------------------------------
+
+function texinfo_searchNode {
+
+ # Print action message.
+ cli_printMessage "${MANUAL_BASEFILE}.info.bz2" --as-reading-line
+
+ # Check entry inside documentation structure. If the entry
+ # exits use the info reader to open the info file at the
+ # specified node. Otherwise, ask the user for create it.
+ if [[ -f "$ENTRY" ]];then
+ /usr/bin/info --node="Directories $(texinfo_getNode)" --file=${MANUAL_BASEFILE}.info.bz2
+ else
+ texinfo_editEntry
+ fi
+
+}
diff --git a/Scripts/Functions/Help/Backends/Texinfo/texinfo_updateChaptersFiles.sh b/Scripts/Functions/Help/Backends/Texinfo/texinfo_updateChaptersFiles.sh
new file mode 100755
index 0000000..99464bb
--- /dev/null
+++ b/Scripts/Functions/Help/Backends/Texinfo/texinfo_updateChaptersFiles.sh
@@ -0,0 +1,55 @@
+#!/bin/bash
+#
+# texinfo_updateChaptersFiles.sh -- This function updates chapter related
+# files.
+#
+# Copyright (C) 2009, 2010, 2011 The CentOS Project
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# ----------------------------------------------------------------------
+# $Id$
+# ----------------------------------------------------------------------
+
+function texinfo_updateChaptersFiles {
+
+ # Define chapter's generic structure.
+ local CHAPTERBODY="\
+ @node $MANUAL_CHAPTER_NAME
+ @chapter $MANUAL_CHAPTER_NAME
+ @cindex $(echo $MANUAL_CHAPTER_NAME | tr '[[:upper:]]' '[[:lower:]]')
+ @include $MANUAL_CHAPTER_NAME/chapter-intro.texi
+ @include $MANUAL_CHAPTER_NAME/chapter-menu.texi
+ @include $MANUAL_CHAPTER_NAME/chapter-nodes.texi"
+
+ # Remove any space/tabs at the begining of @... lines.
+ CHAPTERBODY=$(echo "$CHAPTERBODY" | sed -r 's!^[[:space:]]+@!@!')
+
+ # Create directory to store chapter files.
+ if [[ ! -d $MANUAL_CHAPTER_DIR ]];then
+ mkdir $MANUAL_CHAPTER_DIR
+ fi
+
+ # Create files to store chapter information. If chapter files
+ # already exist, they will be re-written and any previous
+ # information inside them will be lost.
+ echo "$CHAPTERBODY" > $MANUAL_CHAPTER_DIR/chapter.texi
+ echo "" > $MANUAL_CHAPTER_DIR/chapter-menu.texi
+ echo "" > $MANUAL_CHAPTER_DIR/chapter-nodes.texi
+
+ # Initialize chapter instroduction using template file.
+ cp ${MANUAL_TEMPLATE}/manual-chapter-intro.texi $MANUAL_CHAPTER_DIR/chapter-intro.texi
+
+}
diff --git a/Scripts/Functions/Help/Backends/Texinfo/texinfo_updateChaptersMenu.sh b/Scripts/Functions/Help/Backends/Texinfo/texinfo_updateChaptersMenu.sh
new file mode 100755
index 0000000..20bf963
--- /dev/null
+++ b/Scripts/Functions/Help/Backends/Texinfo/texinfo_updateChaptersMenu.sh
@@ -0,0 +1,77 @@
+#!/bin/bash
+#
+# texinfo_updateChaptersMenu.sh -- This function updates chapter menu.
+#
+# Copyright (C) 2009, 2010, 2011 The CentOS Project
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# ----------------------------------------------------------------------
+# $Id$
+# ----------------------------------------------------------------------
+
+function texinfo_updateChaptersMenu {
+
+ local ACTION=$1
+ local MENUCHAPTERS=''
+
+ # Build menu of chapters. The Index node is not included as other
+ # nodes are. The Index node is defined inside the master texinfo
+ # file (repository.texi) as an included file. To create the final
+ # .info file correctly, the Index line in the menu should remain,
+ # even no other node exist.
+ if [[ -f ${MANUAL_BASEFILE}-menu.texi ]];then
+ MENUCHAPTERS=$(cat ${MANUAL_BASEFILE}-menu.texi \
+ | egrep -v "^(@(end )?menu$|\* Index::.*)$")
+ fi
+
+ # Re-defined menu of chapters based on action.
+ case $ACTION in
+ 'remove-entry' )
+ # Remove chapter from menu.
+ MENUCHAPTERS=$(echo "${MENUCHAPTERS}" \
+ | egrep -v "^\* ${MANUAL_CHAPTER_NAME}::[[:print:]]*$")
+ ;;
+ 'update-entry' | * )
+ # Update chapter menu using texinfo format.
+ MENUCHAPTERS="${MENUCHAPTERS}
+ * ${MANUAL_CHAPTER_NAME}::"
+ ;;
+ esac
+
+ # Remove opening spaces/tabs and empty line from the menu of
+ # chapters. Empty lines may occur the first time the menu of
+ # chapters is created.
+ MENUCHAPTERS=$(echo "${MENUCHAPTERS}" | sed -r 's!^[[:space:]]+!!' \
+ | egrep -v '^[[:space:]]*$')
+
+ # Organize menu of chapters alphabetically and verify that no
+ # duplicated line be included on the list.
+ MENUCHAPTERS=$(echo "${MENUCHAPTERS}" | sort | uniq)
+
+ # Give format to final menu output.
+ MENUCHAPTERS="@menu
+ ${MENUCHAPTERS}
+ * Index::
+ @end menu"
+
+ # Strip opening space/tabs from final menu of chapters.
+ MENUCHAPTERS=$(echo "${MENUCHAPTERS}" | sed -r 's!^[[:space:]]+!!' \
+ | egrep -v '^[[:space:]]*$')
+
+ # Dump organized menu of chapters into file.
+ echo "${MENUCHAPTERS}" > ${MANUAL_BASEFILE}-menu.texi
+
+}
diff --git a/Scripts/Functions/Help/Backends/Texinfo/texinfo_updateChaptersNodes.sh b/Scripts/Functions/Help/Backends/Texinfo/texinfo_updateChaptersNodes.sh
new file mode 100755
index 0000000..a28f904
--- /dev/null
+++ b/Scripts/Functions/Help/Backends/Texinfo/texinfo_updateChaptersNodes.sh
@@ -0,0 +1,49 @@
+#!/bin/bash
+#
+# texinfo_updateChaptersNodes.sh -- This function updates nodes of
+# chapters based on menu of chapters.
+#
+# Copyright (C) 2009, 2010, 2011 The CentOS Project
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# ----------------------------------------------------------------------
+# $Id$
+# ----------------------------------------------------------------------
+
+function texinfo_updateChaptersNodes {
+
+ # Build list "nodes of chapters" based on menu of chapters.
+ local CHAPTERNODES=$(cat ${MANUAL_BASEFILE}-menu.texi \
+ | egrep -v '^@(end )?menu$' \
+ | egrep -v "^\* `gettext "Index"`::[[:print:]]*$" \
+ | sed -r 's!^\* !!' | sed -r 's!::[[:print:]]*$!!g' \
+ | sed -r 's! !_!g' | sort | uniq )
+
+ # Build list of texinfo inclusions to load chapters' nodes.
+ local FILENODE=$(\
+ for CHAPTERNODE in ${CHAPTERNODES};do
+
+ INCL=$(echo ${CHAPTERNODE} | sed -r "s!(${CHAPTERNODE})!\1/chapter\.texi!")
+
+ # Output inclusion line using texinfo format.
+ echo "@include $INCL"
+
+ done)
+
+ # Dump organized nodes of chapters into file.
+ echo "$FILENODE" > ${MANUAL_BASEFILE}-nodes.texi
+
+}
diff --git a/Scripts/Functions/Help/Backends/Texinfo/texinfo_updateMenu.sh b/Scripts/Functions/Help/Backends/Texinfo/texinfo_updateMenu.sh
new file mode 100755
index 0000000..b5aa015
--- /dev/null
+++ b/Scripts/Functions/Help/Backends/Texinfo/texinfo_updateMenu.sh
@@ -0,0 +1,82 @@
+#!/bin/bash
+#
+# texinfo_updateMenu.sh -- This function updates menu lines inside
+# texinfo chapters. If this function is called with the
+# 'remove-entry' string as first argument, then the menu line related
+# to the entry being processed is removed. If this function is called
+# with the 'update-entry' string as first argument, then the menu line
+# related to the entry being processed is added to the menu. If no
+# argument is passed to this function, the 'update-entry' action is
+# assumed.
+#
+# Copyright (C) 2009, 2010, 2011 The CentOS Project
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# ----------------------------------------------------------------------
+# $Id$
+# ----------------------------------------------------------------------
+
+function texinfo_updateMenu {
+
+ # Specify which action to do inside chapter's menu.
+ local ACTION="$1"
+
+ # Build the menu node related to the entry being processed
+ # currently.
+ local MENUNODE=$(echo "$ENTRY" | cut -d / -f9- | tr '/' ' ' \
+ | sed 's!\.texi$!!')
+
+ # Give format to menu line using texinfo style.
+ local MENULINE="* ${MANUAL_CHAPTER_NAME} $MENUNODE::"
+
+ # Define chapter's menu. Remove `@menu', `@end menu', and empty lines
+ # from output.
+ local MENU=$(cat $MANUAL_CHAPTER_DIR/chapter-menu.texi \
+ | egrep -v '^[[:space:]]*$' | egrep -v '^@(end )?menu')
+
+ # Re-defined chapter's menu based on action.
+ case $ACTION in
+ 'remove-entry' )
+ # Remove menu line from chapter's menu.
+ MENU=$(echo "$MENU" | egrep -v "$MENULINE")
+ ;;
+ 'update-entry' | * )
+ # Add menu line to chapter's menu. This is the default
+ # behaivour if no argument is passed to texinfo_updateMenu
+ # function.
+ MENU="$MENU
+ $MENULINE"
+ ;;
+ esac
+
+ # Organize menu alphabetically, remove empty and duplicated lines.
+ # At this point, empty line may occur the first time the menu is
+ # created, don't let them to scape.
+ MENU=$(echo "$MENU" | egrep -v '^[[:space:]]*$' | sort | uniq )
+
+ # Rebuild chapter's menu structure adding '@menu' and '@end menu'
+ # lines back in menu.
+ MENU="@menu
+ $MENU
+ @end menu"
+
+ # Remove opening spaces/tabs from final menu structure.
+ MENU=$(echo "$MENU" | sed -r 's!^[[:space:]]+!!g')
+
+ # Dump final menu structure back into chapter's menu file.
+ echo "$MENU" > $MANUAL_CHAPTER_DIR/chapter-menu.texi
+
+}
diff --git a/Scripts/Functions/Help/Backends/Texinfo/texinfo_updateNodes.sh b/Scripts/Functions/Help/Backends/Texinfo/texinfo_updateNodes.sh
new file mode 100755
index 0000000..c0a0d2a
--- /dev/null
+++ b/Scripts/Functions/Help/Backends/Texinfo/texinfo_updateNodes.sh
@@ -0,0 +1,80 @@
+#!/bin/bash
+#
+# texinfo_updateNodes.sh -- This function updates chapter's nodes
+# definition using the chapter's menu as reference.
+#
+# Copyright (C) 2009, 2010, 2011 The CentOS Project
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# ----------------------------------------------------------------------
+# $Id$
+# ----------------------------------------------------------------------
+
+function texinfo_updateNodes {
+
+ local TEXINFO_TEMPLATE=''
+
+ # Retrive nodes' entries from chapter-menu.texi file.
+ local NODES=$(cat $MANUAL_CHAPTER_DIR/chapter-menu.texi \
+ | sed -r 's!^\* !!' | sed -r 's!:{1,2}.*$!!g' \
+ | egrep -v '^@(end )?menu$' | sed -r 's! !:!g' | sort | uniq)
+
+ # Re-build node structure based on menu information.
+ for NODE in $NODES;do
+
+ NODE=$(echo "${NODE}" | sed -r 's!:! !g')
+ SECT=$(echo "$NODE" | sed -r 's! !/!g' | sed "s!${MANUAL_CHAPTER_NAME}/!!")
+ INCL=$(echo "$NODE" | sed -r 's! !/!g').texi
+ CIND=$(echo "$NODE")
+
+ # Create an empty directory to store texinfo files.
+ if [[ ! -d ${MANUAL_BASEDIR}/$(dirname "$INCL") ]];then
+ mkdir -p ${MANUAL_BASEDIR}/$(dirname "$INCL")
+ fi
+
+ # Create texinfo section file using templates.
+ if [[ ! -f ${MANUAL_BASEDIR}/$INCL ]];then
+
+ # Define what template to apply using the absolute path of
+ # the documentation entry as reference.
+ if [[ ${MANUAL_BASEDIR}/${INCL} =~ 'trunk/Scripts/Functions/.+' ]];then
+ TEXINFO_TEMPLATE="${MANUAL_TEMPLATE}/manual-section-functions.texi"
+ else
+ TEXINFO_TEMPLATE="${MANUAL_TEMPLATE}/manual-section.texi"
+ fi
+
+ # Copy template to its destination.
+ cp ${TEXINFO_TEMPLATE} ${MANUAL_BASEDIR}/$INCL
+
+ # Expand common translation markers.
+ cli_replaceTMarkers "${MANUAL_BASEDIR}/$INCL"
+
+ # Expand texinfo-specific translation markers.
+ ${FUNCNAM}_makeSeeAlso "${MANUAL_BASEDIR}/$INCL" "$NODE"
+
+ fi
+
+ # Output node information based on texinfo menu.
+ echo "@node $NODE"
+ echo "@section `eval_gettext "The @file{\\\$SECT} Directory"`"
+ echo "@cindex $CIND"
+ echo "@include $INCL"
+ echo ""
+
+ # Dump node information into chapter node file.
+ done > $MANUAL_CHAPTER_DIR/chapter-nodes.texi
+
+}
diff --git a/Scripts/Functions/Help/Backends/Texinfo/texinfo_updateOutputFileInfo.sh b/Scripts/Functions/Help/Backends/Texinfo/texinfo_updateOutputFileInfo.sh
new file mode 100755
index 0000000..8407d95
--- /dev/null
+++ b/Scripts/Functions/Help/Backends/Texinfo/texinfo_updateOutputFileInfo.sh
@@ -0,0 +1,39 @@
+#!/bin/bash
+#
+# texinfo_updateOutputFileInfo.sh -- This function exports
+# documentation manual to info format.
+#
+# Copyright (C) 2009, 2010, 2011 The CentOS Project
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# ----------------------------------------------------------------------
+# $Id$
+# ----------------------------------------------------------------------
+
+function texinfo_updateOutputFileInfo {
+
+ # Output action message.
+ cli_printMessage "${MANUAL_BASEFILE}.info.bz2" --as-updating-line
+
+ # Update info file.
+ /usr/bin/makeinfo ${MANUAL_BASEFILE}.texi --output=${MANUAL_BASEFILE}.info
+
+ # Compress info file.
+ if [[ $? -eq 0 ]];then
+ bzip2 -f ${MANUAL_BASEFILE}.info
+ fi
+
+}
diff --git a/Scripts/Functions/Help/Backends/Texinfo/texinfo_updateOutputFilePdf.sh b/Scripts/Functions/Help/Backends/Texinfo/texinfo_updateOutputFilePdf.sh
new file mode 100755
index 0000000..e4e4b99
--- /dev/null
+++ b/Scripts/Functions/Help/Backends/Texinfo/texinfo_updateOutputFilePdf.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+#
+# texinfo_updateOutputFilePdf.sh -- This function exports documentation
+# manual to PDF format.
+#
+# Copyright (C) 2009, 2010, 2011 The CentOS Project
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# ----------------------------------------------------------------------
+# $Id$
+# ----------------------------------------------------------------------
+
+function texinfo_updateOutputFilePdf {
+
+ # Output action message.
+ cli_printMessage "${MANUAL_BASEFILE}.pdf" --as-updating-line
+
+ # Update plaintext output directory.
+ /usr/bin/texi2pdf --quiet \
+ ${MANUAL_BASEFILE}.texi --output=${MANUAL_BASEFILE}.pdf
+
+}
diff --git a/Scripts/Functions/Help/Backends/Texinfo/texinfo_updateOutputFilePlaintext.sh b/Scripts/Functions/Help/Backends/Texinfo/texinfo_updateOutputFilePlaintext.sh
new file mode 100755
index 0000000..8601513
--- /dev/null
+++ b/Scripts/Functions/Help/Backends/Texinfo/texinfo_updateOutputFilePlaintext.sh
@@ -0,0 +1,40 @@
+#!/bin/bash
+#
+# texinfo_updateOutputFilePlaintext.sh -- This function exports
+# documentation manual to plain-text format.
+#
+# Copyright (C) 2009, 2010, 2011 The CentOS Project
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# ----------------------------------------------------------------------
+# $Id$
+# ----------------------------------------------------------------------
+
+function texinfo_updateOutputFilePlaintext {
+
+ # Output action message.
+ cli_printMessage "${MANUAL_BASEFILE}.txt.bz2" --as-updating-line
+
+ # Update plaintext output directory.
+ /usr/bin/makeinfo --plaintext \
+ ${MANUAL_BASEFILE}.texi --output=${MANUAL_BASEFILE}.txt
+
+ # Compress plaintext output file.
+ if [[ -f ${MANUAL_BASEFILE}.txt ]];then
+ bzip2 ${MANUAL_BASEFILE}.txt --force
+ fi
+
+}
diff --git a/Scripts/Functions/Help/Backends/Texinfo/texinfo_updateOutputFileXhtml.sh b/Scripts/Functions/Help/Backends/Texinfo/texinfo_updateOutputFileXhtml.sh
new file mode 100755
index 0000000..168b5c4
--- /dev/null
+++ b/Scripts/Functions/Help/Backends/Texinfo/texinfo_updateOutputFileXhtml.sh
@@ -0,0 +1,80 @@
+#!/bin/bash
+#
+# texinfo_updateOutputFileXhtml.sh -- This function exports
+# documentation manual to HTML format.
+#
+# Copyright (C) 2009, 2010, 2011 The CentOS Project
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# ----------------------------------------------------------------------
+# $Id$
+# ----------------------------------------------------------------------
+
+function texinfo_updateOutputFileXhtml {
+
+ # Output action message.
+ cli_printMessage "${MANUAL_BASEFILE}.xhtml.tar.bz2" --as-updating-line
+
+ # Redefine manual base file to use just the file base name.
+ local MANUAL_BASEFILE=$(basename "$MANUAL_BASEFILE")
+
+ # Add manual base directory path into directory stack to make it
+ # the current working directory. This is done to reduce the path
+ # information packaged inside `repository.xhtml.tar.bz2' file.
+ pushd ${MANUAL_BASEDIR} > /dev/null
+
+ # Prepare directory structure where xhtml files will be stored in.
+ [[ ! -d ${MANUAL_BASEFILE}.xhtml ]] && mkdir -p ${MANUAL_BASEFILE}.xhtml
+
+ # Clean up directory structure where xhtml files will be stored.
+ # We don't want to have unused files inside it.
+ [[ $(ls ${MANUAL_BASEFILE}.xhtml > /dev/null) ]] && rm ${MANUAL_BASEFILE}.xhtml/*.xhtml
+
+ # Add directory where xhtml files will be sotred in into directory
+ # stack to make it the current working directory. This is required
+ # in order for include paths to be constructed correctly.
+ pushd ${MANUAL_BASEFILE}.xhtml > /dev/null
+
+ # Update xhtml files. Use texi2html to export from texinfo file
+ # format to html using CentOS Web default visual style.
+ texi2html --init-file=${MANUAL_BASEDIR}/${MANUAL_BASEFILE}-init.pl \
+ --output=${MANUAL_BASEDIR}/${MANUAL_BASEFILE}.xhtml \
+ ${MANUAL_BASEDIR}/${MANUAL_BASEFILE}.texi
+
+ # Remove directory where xhtml files are stored from directory
+ # stack. The xhtml files have been already created.
+ popd > /dev/null
+
+ # Apply xhtml transformations. This transformation cannot be built
+ # inside the initialization script (repository.init). For example,
+ # I can't see a possible way to produce different quotation HTML
+ # outputs from the same texinfo quotation definition. Instead,
+ # once the HTML code is produced we can take que quotation HTML
+ # definition plus the first letters inside it and transform the
+ # structure to a completly different thing that can be handle
+ # through classed inside CSS definitions.
+ sed -r -i -f ${MANUAL_BASEFILE}.sed ${MANUAL_BASEFILE}.xhtml/*.xhtml
+
+ # Compress directory structure where xhtml files are stored in.
+ # This compressed version is the one we put under version control.
+ # The directory used to build the compressed version is left
+ # unversion for the matter of human revision.
+ tar -cjf ${MANUAL_BASEFILE}.xhtml.tar.bz2 ${MANUAL_BASEFILE}.xhtml
+
+ # Remove manual base directory from directory stack.
+ popd > /dev/null
+
+}
diff --git a/Scripts/Functions/Help/Backends/Texinfo/texinfo_updateOutputFileXml.sh b/Scripts/Functions/Help/Backends/Texinfo/texinfo_updateOutputFileXml.sh
new file mode 100755
index 0000000..acdc47b
--- /dev/null
+++ b/Scripts/Functions/Help/Backends/Texinfo/texinfo_updateOutputFileXml.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+#
+# texinfo_updateOutputFileXml.sh -- This function exports documentation
+# manual to XML format.
+#
+# Copyright (C) 2009, 2010, 2011 The CentOS Project
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# ----------------------------------------------------------------------
+# $Id$
+# ----------------------------------------------------------------------
+
+function texinfo_updateOutputFileXml {
+
+ # Print action message.
+ cli_printMessage "${MANUAL_BASEFILE}.xml" --as-updating-line
+
+ # Update xml output format.
+ /usr/bin/makeinfo --xml \
+ ${MANUAL_BASEFILE}.texi --output=${MANUAL_BASEFILE}.xml \
+
+}
diff --git a/Scripts/Functions/Help/Backends/Texinfo/texinfo_updateOutputFiles.sh b/Scripts/Functions/Help/Backends/Texinfo/texinfo_updateOutputFiles.sh
new file mode 100755
index 0000000..9e44c62
--- /dev/null
+++ b/Scripts/Functions/Help/Backends/Texinfo/texinfo_updateOutputFiles.sh
@@ -0,0 +1,45 @@
+#!/bin/bash
+#
+# texinfo_updateOutputFiles.sh -- This function exports documentation
+# manual to different output formats.
+#
+# Copyright (C) 2009, 2010, 2011 The CentOS Project
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# ----------------------------------------------------------------------
+# $Id$
+# ----------------------------------------------------------------------
+
+function texinfo_updateOutputFiles {
+
+ # Print separator line.
+ cli_printMessage '-' --as-separator-line
+
+ # Add the working copy root directory to directory stack to make
+ # path construction correctly. Otherwise, makeinfo may produce
+ # paths incorrectly.
+ pushd ${HOME}/artwork > /dev/null
+
+ texinfo_updateOutputFileInfo
+ texinfo_updateOutputFileXhtml
+ texinfo_updateOutputFileXml
+ texinfo_updateOutputFilePdf
+ texinfo_updateOutputFilePlaintext
+
+ # Remove the working copy root directory from directory stack.
+ popd > /dev/null
+
+}
diff --git a/Scripts/Functions/Help/Modules/Docbook/Templates/manual-appendix.docbook b/Scripts/Functions/Help/Modules/Docbook/Templates/manual-appendix.docbook
deleted file mode 100644
index 056b9b4..0000000
--- a/Scripts/Functions/Help/Modules/Docbook/Templates/manual-appendix.docbook
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
- =TITLE=
-
- =LIST_OF_ENTITIES=
-
-
diff --git a/Scripts/Functions/Help/Modules/Docbook/Templates/manual-chapter.docbook b/Scripts/Functions/Help/Modules/Docbook/Templates/manual-chapter.docbook
deleted file mode 100644
index 88d4e0e..0000000
--- a/Scripts/Functions/Help/Modules/Docbook/Templates/manual-chapter.docbook
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
- =TITLE=
-
- =LIST_OF_ENTITIES=
-
-
diff --git a/Scripts/Functions/Help/Modules/Docbook/Templates/manual-sect1.docbook b/Scripts/Functions/Help/Modules/Docbook/Templates/manual-sect1.docbook
deleted file mode 100644
index 46c44c0..0000000
--- a/Scripts/Functions/Help/Modules/Docbook/Templates/manual-sect1.docbook
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
- =TITLE=
-
- ...
-
-
diff --git a/Scripts/Functions/Help/Modules/Docbook/Templates/manual.docbook b/Scripts/Functions/Help/Modules/Docbook/Templates/manual.docbook
deleted file mode 100644
index 2e9c7ee..0000000
--- a/Scripts/Functions/Help/Modules/Docbook/Templates/manual.docbook
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-&book-preamble;
-&book-parts;
-
diff --git a/Scripts/Functions/Help/Modules/Texinfo/Templates/manual-chapter-intro.texi b/Scripts/Functions/Help/Modules/Texinfo/Templates/manual-chapter-intro.texi
deleted file mode 100644
index e69de29..0000000
--- a/Scripts/Functions/Help/Modules/Texinfo/Templates/manual-chapter-intro.texi
+++ /dev/null
diff --git a/Scripts/Functions/Help/Modules/Texinfo/Templates/manual-copyright-cc-by-sa.texi b/Scripts/Functions/Help/Modules/Texinfo/Templates/manual-copyright-cc-by-sa.texi
deleted file mode 100755
index 9ec8135..0000000
--- a/Scripts/Functions/Help/Modules/Texinfo/Templates/manual-copyright-cc-by-sa.texi
+++ /dev/null
@@ -1,8 +0,0 @@
-Copyright @copyright{} =COPYRIGHT_YEAR_LIST= =COPYRIGHT_HOLDER=
-
-Permission is granted to copy, distribute and/or modify this document
-under the terms of the a Creative Commons Attribution–Share Alike 3.0
-Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available
-at @url{http://creativecommons.org/licenses/by-sa/3.0/}. In accordance
-with CC-BY-SA, if you distribute this document or an adaptation of it,
-you must provide the URL for the original version.
diff --git a/Scripts/Functions/Help/Modules/Texinfo/Templates/manual-copyright-gfdl.texi b/Scripts/Functions/Help/Modules/Texinfo/Templates/manual-copyright-gfdl.texi
deleted file mode 100755
index 1a67c65..0000000
--- a/Scripts/Functions/Help/Modules/Texinfo/Templates/manual-copyright-gfdl.texi
+++ /dev/null
@@ -1,8 +0,0 @@
-Copyright @copyright{} =COPYRIGHT_YEAR_LIST= =COPYRIGHT_HOLDER=
-
-Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.2 or
-any later version published by the Free Software Foundation; with no
-Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
-copy of the license is included in the section entitled ``GNU Free
-Documentation License''.
diff --git a/Scripts/Functions/Help/Modules/Texinfo/Templates/manual-index.texi b/Scripts/Functions/Help/Modules/Texinfo/Templates/manual-index.texi
deleted file mode 100644
index abe002c..0000000
--- a/Scripts/Functions/Help/Modules/Texinfo/Templates/manual-index.texi
+++ /dev/null
@@ -1,3 +0,0 @@
-@node Index
-@unnumbered Index
-@printindex cp
diff --git a/Scripts/Functions/Help/Modules/Texinfo/Templates/manual-menu.texi b/Scripts/Functions/Help/Modules/Texinfo/Templates/manual-menu.texi
deleted file mode 100644
index 70362c8..0000000
--- a/Scripts/Functions/Help/Modules/Texinfo/Templates/manual-menu.texi
+++ /dev/null
@@ -1,3 +0,0 @@
-@menu
-* Index::
-@end menu
diff --git a/Scripts/Functions/Help/Modules/Texinfo/Templates/manual-nodes.texi b/Scripts/Functions/Help/Modules/Texinfo/Templates/manual-nodes.texi
deleted file mode 100644
index e69de29..0000000
--- a/Scripts/Functions/Help/Modules/Texinfo/Templates/manual-nodes.texi
+++ /dev/null
diff --git a/Scripts/Functions/Help/Modules/Texinfo/Templates/manual-section-functions.texi b/Scripts/Functions/Help/Modules/Texinfo/Templates/manual-section-functions.texi
deleted file mode 100644
index 9071086..0000000
--- a/Scripts/Functions/Help/Modules/Texinfo/Templates/manual-section-functions.texi
+++ /dev/null
@@ -1,35 +0,0 @@
-@subheading Name
-
-@dots{}
-
-@subheading Synopsis
-
-@dots{}
-
-@subheading Description
-
-@dots{}
-
-@subheading Examples
-
-@dots{}
-
-@subheading Author
-
-Written by @dots{}
-
-@subheading Reporting bugs
-
-Report bugs to @email{centos-artwork@@centos.org} mailing list.
-
-@subheading Copyright
-
-Copyright @copyright{} =COPYRIGHT_YEAR_LIST= =COPYRIGHT_HOLDER=
-
-This is free software. You may redistribute copies of it under the
-terms of the GNU General Public License (@pxref{GNU General Public
-License}). There is NO WARRANTY, to the extent permitted by law.
-
-@subheading See also
-
-=TEXINFO_SEEALSO=
diff --git a/Scripts/Functions/Help/Modules/Texinfo/Templates/manual-section.texi b/Scripts/Functions/Help/Modules/Texinfo/Templates/manual-section.texi
deleted file mode 100644
index d6bb628..0000000
--- a/Scripts/Functions/Help/Modules/Texinfo/Templates/manual-section.texi
+++ /dev/null
@@ -1,23 +0,0 @@
-@subheading Goals
-
-@itemize
-@item ...
-@end itemize
-
-@subheading Description
-
-@itemize
-@item ...
-@end itemize
-
-@subheading Usage
-
-@itemize
-@item ...
-@end itemize
-
-@subheading See also
-
-@itemize
-@item ...
-@end itemize
diff --git a/Scripts/Functions/Help/Modules/Texinfo/Templates/manual.texi b/Scripts/Functions/Help/Modules/Texinfo/Templates/manual.texi
deleted file mode 100644
index 3d05184..0000000
--- a/Scripts/Functions/Help/Modules/Texinfo/Templates/manual.texi
+++ /dev/null
@@ -1,55 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@c $Id$
-@c -- Header --------------------------------------------------
-
-@setfilename =FILENAME=.info
-@settitle =TITLE=
-@documentlanguage =LOCALE_LL=
-@afourpaper
-@finalout
-
-@c -- Summary description and copyright -----------------------
-
-@copying
-=DESCRIPTION=
-
-Copyright @copyright{} =COPYRIGHT_YEAR= =COPYRIGHT_HOLDER=
-
-Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.2 or
-any later version published by the Free Software Foundation; with no
-Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
-copy of the license is included in the section entitled GNU Free
-Documentation License.
-@end copying
-
-@c -- Titlepage, contents, copyright ---------------------------
-
-@titlepage
-@title =TITLE=
-@subtitle =SUBTITLE=
-@author =AUTHOR=
-@page
-@vskip 0pt plus 1filll
-@insertcopying
-@end titlepage
-@contents
-
-@c -- `Top' node and master menu -------------------------------
-
-@ifnottex
-@node Top
-@top =TITLE=
-@insertcopying
-@end ifnottex
-@include manual-menu.texi
-
-@c -- The body of the document --------------------------------
-
-@include manual-nodes.texi
-
-@c -- The end of the document ---------------------------------
-
-@include manual-index.texi
-
-@bye
diff --git a/Scripts/Functions/Help/Modules/Texinfo/texinfo_copyEntry.sh b/Scripts/Functions/Help/Modules/Texinfo/texinfo_copyEntry.sh
deleted file mode 100755
index 20c29cb..0000000
--- a/Scripts/Functions/Help/Modules/Texinfo/texinfo_copyEntry.sh
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/bin/bash
-#
-# texinfo_copyEntry.sh -- This function copies documentation entries and
-# updates documentation structure to reflect changes.
-#
-# Copyright (C) 2009, 2010, 2011 The CentOS Project
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# ----------------------------------------------------------------------
-# $Id$
-# ----------------------------------------------------------------------
-
-function texinfo_copyEntry {
-
- # Print separator line.
- cli_printMessage '-' --as-separator-line
-
- local ENTRY_SRC="$ENTRY"
- local ENTRIES=''
- local ENTRY=''
-
- # Verify parent directory of entry destination. If its parent
- # directory doesn't exist, create it and add it to the repository.
- if [[ ! -d $(dirname ${ENTRY_DST}) ]];then
- mkdir -p $(dirname ${ENTRY_DST})
- svn add $(dirname ${ENTRY_DST}) --quiet
- fi
-
- # Copy main documentation entry.
- if [[ -a ${ENTRY_SRC} ]] && [[ ! -a ${ENTRY_DST} ]];then
- cli_printMessage "${ENTRY_DST}" --as-creating-line
- svn cp "${ENTRY_SRC}" "${ENTRY_DST}" --quiet
- fi
-
- # Define target location of directory holding dependent
- # documentation entries.
- ENTRY_DST=$(echo ${ENTRY_DST} | sed -r 's!\.texi$!!')
-
- # Copy dependent documentation entries, if any.
- if [[ -d ${ENTRY_DIR}/${ENTRY_FILE} ]] && [[ ! -d ${ENTRY_DST} ]];then
- cli_printMessage "${ENTRY_DST}" --as-creating-line
- svn cp "${ENTRY_DIR}/${ENTRY_FILE}" "${ENTRY_DST}" --quiet
- fi
-
- # Define list of files to process.
- ENTRIES=$(cli_getFilesList $(dirname ${ENTRY_DST}) --pattern=".*$(basename ${ENTRY_DST}).*\.texi")
-
- # Print separator line.
- cli_printMessage '-' --as-separator-line
-
- # Print action message.
- cli_printMessage "Updating menus, nodes and cross-references." --as-response-line
-
- # Redefine ENTRY variable in order to update documentation
- # structure, taking recently created entries as reference.
- for ENTRY in ${ENTRIES};do
-
- # Update menu and node definitions from manual sections to
- # reflect the changes.
- texinfo_updateMenu
- texinfo_updateNodes
-
- # Update cross reference definitions from manual to reflect
- # the changes.
- texinfo_restoreCrossReferences
-
- done
-
-}
diff --git a/Scripts/Functions/Help/Modules/Texinfo/texinfo_deleteCrossReferences.sh b/Scripts/Functions/Help/Modules/Texinfo/texinfo_deleteCrossReferences.sh
deleted file mode 100755
index 9472000..0000000
--- a/Scripts/Functions/Help/Modules/Texinfo/texinfo_deleteCrossReferences.sh
+++ /dev/null
@@ -1,90 +0,0 @@
-#!/bin/bash
-#
-# texinfo_deleteCrossReferences.sh -- This function looks inside
-# texinfo source files, from section level on, and removes all cross
-# referece definitions related to a documentation entry. Use this
-# function in coordination with texinfo_deleteEntry function, in order
-# to keep cross reference information, inside the documentation
-# manual, syncronized.
-#
-# Copyright (C) 2009, 2010, 2011 The CentOS Project
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# ----------------------------------------------------------------------
-# $Id$
-# ----------------------------------------------------------------------
-
-function texinfo_deleteCrossReferences {
-
- local -a PATTERN
- local -a REPLACE
- local LOCATION=''
-
- # Define entry location. Verify first argument to make this
- # function reusable. If no value is passed as first argument use
- # entry global information value as default value instead.
- if [[ "$1" != '' ]];then
- LOCATION="$1"
- else
- LOCATION="$ENTRY"
- fi
-
- # Build the node string using entry location.
- local NODE=$(echo "$LOCATION" \
- | cut -d / -f8- \
- | tr '/' ' ' \
- | sed -r \
- -e "s/(chapter-intro\.texi|\.texi)$//" \
- -e 's! !( |\\n)!g')
-
- # Define regular expression patterns for texinfo cross reference
- # commands.
- PATTERN[0]="@(pxref|xref|ref)\{(${NODE})\}"
- PATTERN[1]="^(\* ${NODE}:(.*)?:(.*)?)$"
-
- # Define replacement string for missing entries. It is convenient
- # to keep missing entries in documentation for documentation team
- # to know. Removing the missing cross reference may intorudce
- # confussion. Imagine that! you are spending lots of hours in an
- # article and suddenly one of your cross refereces disappears with
- # no visible reason, with the next working copy update you
- # perform. That's frustrating. Instead, when centos-art.sh script
- # finds a missing cross reference it removes the link and remark
- # the issue for you to act on it.
- REPLACE[0]='--- @strong{'`gettext "Removed"`'}(\1:\2) ---'
- REPLACE[1]='@comment --- '`gettext "Removed"`'(\1) ---'
-
- # Define list of entries to process.
- local ENTRIES=$(cli_getFilesList ${MANUAL_BASEDIR} --pattern='.*\.texi')
-
- # Update node-related cross references. The node-related cross
- # reference definition, long ones specially, could require more
- # than one line to be set. By default, GNU sed does not matches
- # newline characters in the pattern space, so we need to make use
- # of `label' feature and the `N' command in order to build a
- # pattern space that includes the newline character in it. Here we
- # use the `a' letter to name the label we use, followed by N
- # command to add a newline to the pattern space, the s command to
- # make the pattern replacement using the `g' flag to make it
- # global and finaly the command `b' to branch label named `a'.
- sed -r -i ":a;N;s!${PATTERN[0]}!${REPLACE[0]}!g;ba" ${ENTRIES}
-
- # Update menu-related cross references. Menu-related cross
- # references hardly appear in more than one line, so there is no
- # need to complicate the replacement command.
- sed -r -i "s!${PATTERN[1]}!${REPLACE[1]}!" ${ENTRIES}
-
-}
diff --git a/Scripts/Functions/Help/Modules/Texinfo/texinfo_deleteEntry.sh b/Scripts/Functions/Help/Modules/Texinfo/texinfo_deleteEntry.sh
deleted file mode 100755
index 140796e..0000000
--- a/Scripts/Functions/Help/Modules/Texinfo/texinfo_deleteEntry.sh
+++ /dev/null
@@ -1,109 +0,0 @@
-#!/bin/bash
-#
-# texinfo_deleteEntry.sh -- This function removes a documentation entry
-# from documentation directory structure.
-#
-# Copyright (C) 2009, 2010, 2011 The CentOS Project
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# ----------------------------------------------------------------------
-# $Id$
-# ----------------------------------------------------------------------
-
-function texinfo_deleteEntry {
-
- # Print separator line.
- cli_printMessage '-' --as-separator-line
-
- local ENTRY_SRC=${ENTRY}
- local ENTRIES=''
- local ENTRY=''
- local ENTRY_DEP=''
-
- # Initiate list of entries to remove using the entry specified in
- # the command line.
- ENTRIES=${ENTRY_SRC}
-
- # Verify existence of dependent entries. Dependent entries are
- # stored inside a directory with the same name of the entry you
- # are trying to remove.
- if [[ -d ${ENTRY_DIR}/${ENTRY_FILE} ]];then
-
- # Add dependent files to list of entries.
- ENTRIES="${ENTRIES} $(cli_getFilesList ${ENTRY_DIR}/${ENTRY_FILE} --pattern=".*\.texi")"
-
- # Add dependent directories to list of entries. Be aware of
- # nested directories.
- for ENTRY in ${ENTRIES};do
- ENTRY_DEP=$(echo $ENTRY | sed -r "s/\.texi$//")
- if [[ -d $ENTRY_DEP ]];then
- ENTRIES="${ENTRIES} ${ENTRY_DEP}"
- fi
- done
-
- fi
-
- # Prepare list of entries for action preamble.
- ENTRIES=$(echo ${ENTRIES} | tr ' ' "\n" | sort -r | uniq)
-
- # Print action preamble.
- cli_printActionPreamble $ENTRIES --to-delete
-
- # Remove documentation entry using Subversion's `delete' command
- # to know when the action took place. Do not use regular `rm'
- # command here.
- svn del ${ENTRIES} --quiet
-
- # Verify exit status from subversion command to be sure everything
- # went well. Otherwhise stop script execution.
- if [[ $? -ne 0 ]];then
- cli_printMessage "${FUNCDIRNAM}" --as-toknowmore-line
- fi
-
- # Print separator line.
- cli_printMessage '-' --as-separator-line
-
- # Print action message.
- cli_printMessage "Updating menus, nodes and cross-references." '--as-response-line'
-
- # Process list of entries in order to update menus, nodes and
- # cross references. Since we are verifying entry status before
- # remove the we cannot update the information in the same loop we
- # remove files. This would modify some file before be removed and
- # that would stop script execution. Similary, if we do update
- # menus, nodes and cross references before removing files it would
- # be needed to remove farther status verification in order for the
- # script to continue its execution. Thereby, I can't see a
- # different way but removing files first using status verification
- # and later go through entries list again to update menus, nodes
- # and cross references in remaining files.
- for ENTRY in ${ENTRIES};do
-
- # Update menu and node definitions from manual sections to
- # reflect the changes.
- texinfo_updateMenu "remove-entry"
- texinfo_updateNodes
-
- # Update cross reference definitions from manual to reflect
- # the changes.
- texinfo_deleteCrossReferences
-
- done
-
- # Rebuild output files to propagate recent changes.
- texinfo_updateOutputFiles
-
-}
diff --git a/Scripts/Functions/Help/Modules/Texinfo/texinfo_editEntry.sh b/Scripts/Functions/Help/Modules/Texinfo/texinfo_editEntry.sh
deleted file mode 100755
index 312682d..0000000
--- a/Scripts/Functions/Help/Modules/Texinfo/texinfo_editEntry.sh
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/bin/bash
-#
-# texinfo_editEntry.sh -- This function implements the edition flow of
-# documentation entries inside the working copy.
-#
-# Copyright (C) 2009, 2010, 2011 The CentOS Project
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# ----------------------------------------------------------------------
-# $Id$
-# ----------------------------------------------------------------------
-
-function texinfo_editEntry {
-
- # Print separator line.
- cli_printMessage '-' --as-separator-line
-
- # Verify chapter definition inside manual.
- if [[ ! -d $MANUAL_CHAPTER_DIR ]];then
-
- # Print confirmation question.
- cli_printMessage "`gettext "The following documentation chapter will be created:"`"
- cli_printMessage "$MANUAL_CHAPTER_DIR" --as-response-line
- cli_printMessage "`gettext "Do you want to continue?"`" --as-yesornorequest-line
-
- # Update manual chapter related files.
- texinfo_updateChaptersFiles
-
- # Update manual chapter related menu.
- texinfo_updateChaptersMenu
-
- # Update manual chapter related nodes (based on chapter
- # related menu).
- texinfo_updateChaptersNodes
-
- fi
-
- # Verify section definition inside chapters.
- if [[ ! -f $ENTRY ]];then
-
- # Print confirmation question.
- cli_printMessage "`gettext "The following documentation section will be created:"`"
- cli_printMessage "$ENTRY" --as-response-line
- cli_printMessage "`gettext "Do you want to continue?"`" --as-yesornorequest-line
-
- # Update chapter section related menu.
- texinfo_updateMenu
-
- # Update chapter section related nodes (based on chapter
- # section related menu).
- texinfo_updateNodes
-
- # Update old missing cross references. If for some reason a
- # documentation entry is removed by mistake, and that mistake
- # is fixing by adding the removed documentation entry back
- # into the repository, rebuild the missing cross reference
- # message to use the correct link to the documentation
- # section.
- texinfo_restoreCrossReferences
-
- else
-
- # Print action message.
- cli_printMessage "$ENTRY" --as-updating-line
-
- fi
-
- # Use default text editor to edit the documentation entry.
- eval $EDITOR $ENTRY
-
- # Rebuild output files to propagate recent changes.
- texinfo_updateOutputFiles
-
-}
diff --git a/Scripts/Functions/Help/Modules/Texinfo/texinfo_getEntry.sh b/Scripts/Functions/Help/Modules/Texinfo/texinfo_getEntry.sh
deleted file mode 100755
index 53a4ca2..0000000
--- a/Scripts/Functions/Help/Modules/Texinfo/texinfo_getEntry.sh
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/bin/bash
-#
-# texinfo_getEntry.sh -- This function builds a documentation entry based
-# on a location specified. Location specification can be both action
-# value (ACTIONVAL) variable or a value passed as first positional
-# parameter.
-#
-# Copyright (C) 2009, 2010, 2011 The CentOS Project
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# ----------------------------------------------------------------------
-# $Id$
-# ----------------------------------------------------------------------
-
-function texinfo_getEntry {
-
- # Define variables as local to avoid conflicts outside.
- local ENTRY=''
- local LOCATION=''
-
- # Redefine location in order to make this function reusable not
- # just for action value variable but whatever value passed as
- # first possitional argument.
- if [[ "$1" != '' ]];then
- LOCATION="$1"
- else
- LOCATION="$ACTIONVAL"
- fi
-
- # Define relative path of entry, from trunk directory on.
- ENTRY=$(echo $LOCATION | sed -r "s!^${HOME}/artwork/!!")
-
- # Verify the entry relative path to find out which documentation
- # manual we are acting on. As convenction, whatever documentation
- # entry you provide outside trunk/Manuals/ directory structure is
- # considered as you are documenting the repository directory
- # structure. Otherwise, if an entry inside trunk/Manuals/ is
- # provided, the directory structure provided is used as default
- # documentation manual for actions like `--create' and `--update'
- # to take place on. Other options like `--edit', `--delete' and
- # `--read' cannot be applied to paths provided inside
- # trunk/Manuals/ such actions need to be performed manually.
- if [[ ${ENTRY} =~ '\.texi$' ]];then
- ENTRY=$(echo ${ENTRY} | sed 's!trunk/Manuals/!!')
- else
- ENTRY=$(dirname Directories/${ENTRY})/$(basename $LOCATION).texi
- fi
-
- # Re-define entry to set absolute path to manuals base directory
- # structure.
- ENTRY=${MANUAL_BASEDIR}/${ENTRY}
-
- # Output entry's absolute path.
- echo ${ENTRY}
-
-}
diff --git a/Scripts/Functions/Help/Modules/Texinfo/texinfo_getNode.sh b/Scripts/Functions/Help/Modules/Texinfo/texinfo_getNode.sh
deleted file mode 100755
index 6773769..0000000
--- a/Scripts/Functions/Help/Modules/Texinfo/texinfo_getNode.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/bash
-#
-# texinfo_getNode.sh -- This function cleans up the action value
-# (ACTIONVAL) directory to make a node name from it.
-#
-# Copyright (C) 2009, 2010, 2011 The CentOS Project
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# ----------------------------------------------------------------------
-# $Id$
-# ----------------------------------------------------------------------
-
-function texinfo_getNode {
-
- local NODE=$(echo "$ACTIONVAL" \
- | sed -r "s!^${HOME}/artwork/!!" \
- | sed -r 's!/! !g' | sed -r 's!^[[:space:]]+!!')
-
- echo "$NODE"
-}
-
diff --git a/Scripts/Functions/Help/Modules/Texinfo/texinfo_makeSeeAlso.sh b/Scripts/Functions/Help/Modules/Texinfo/texinfo_makeSeeAlso.sh
deleted file mode 100755
index b2e6b6e..0000000
--- a/Scripts/Functions/Help/Modules/Texinfo/texinfo_makeSeeAlso.sh
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/bin/bash
-#
-# texinfo_makeSeeAlso.sh -- This function creates an itemized list
-# of links to refer parent documentation entries. This list of links
-# is expanded wherever the =TEXINFO_SEEALSO= translation marker be
-# placed in the documentation entry.
-#
-# Copyright (C) 2009, 2010, 2011 The CentOS Project
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# ----------------------------------------------------------------------
-# $Id$
-# ----------------------------------------------------------------------
-
-function texinfo_makeSeeAlso {
-
- local FILE="$1"
- local NODE="$2"
- local NODECOMP=''
- local NODECOMPS_TOTAL=''
- local -a NODECOMPS
- local SEEALSO_LIST=''
-
- # Stript out the node information in order to retrive its
- # components individually.
- for NODECOMP in $(echo $NODE);do
- NODECOMPS[((++${#NODECOMPS[*]}))]=$NODECOMP
- done
-
- # Define how many components does the node have.
- local NODECOMPS_TOTAL=$((${#NODECOMPS[*]}))
-
- # Define the list content. This list should contain all the parent
- # documentation entries under the same chapter, using the current
- # documentation entry as reference. Assuming no parent directory
- # exist for the current documentation entry, print just one item
- # with three dots as content so as to let the user deside what the
- # most appropriate content for this section would be.
- if [[ $NODECOMPS_TOTAL -gt 2 ]];then
- SEEALSO_LIST=$(\
- until [[ ${NODECOMPS_TOTAL} -eq 2 ]];do
- echo "@item @ref{$NODE" \
- | cut -d ' ' -f-"$NODECOMPS_TOTAL" \
- | sed -r -e 's!^[:space:]*!\\n!' -e 's!$!}!';
- NODECOMPS_TOTAL=$(($NODECOMPS_TOTAL - 1))
- done)
- else
- SEEALSO_LIST=$(echo "@item @dots{}")
- fi
-
- # Define the list type and merge its content.
- SEEALSO_LIST="$(echo '@itemize'$SEEALSO_LIST'\n@end itemize')"
-
- # Expand translation marker in the documentation entry.
- sed -i -e "/=TEXINFO_SEEALSO=/c\\$SEEALSO_LIST" $FILE
-
-}
diff --git a/Scripts/Functions/Help/Modules/Texinfo/texinfo_renameCrossReferences.sh b/Scripts/Functions/Help/Modules/Texinfo/texinfo_renameCrossReferences.sh
deleted file mode 100755
index 4f706f9..0000000
--- a/Scripts/Functions/Help/Modules/Texinfo/texinfo_renameCrossReferences.sh
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/bin/bash
-#
-# texinfo_renameCrossReferences.sh -- This function replaces a node
-# pattern with a node replacement and updates cross-reference
-# definitions to reflect the changes.
-#
-# Copyright (C) 2009, 2010, 2011 The CentOS Project
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# ----------------------------------------------------------------------
-# $Id$
-# ----------------------------------------------------------------------
-
-function texinfo_renameCrossReferences {
-
- local NODE=''
- local COUNT=1
- local ENTRIES=''
- local NODE_SRC=''
- local NODE_DST=''
-
- # Define node pattern for source documenation entry.
- NODE_SRC=$(echo "$ENTRY" \
- | cut -d / -f8- \
- | tr '/' ' ' \
- | sed -r \
- -e "s/(chapter-intro\.texi|\.texi)$//")
-
- # Define node replacement for target documentation entry.
- NODE_DST=$(echo "$ENTRY_DST" \
- | cut -d / -f8- \
- | tr '/' ' ' \
- | sed -r \
- -e "s/(chapter-intro\.texi|\.texi)$//")
-
- # Define list of entries to process.
- ENTRIES=$(cli_getFilesList ${MANUAL_BASEDIR} --pattern='.*\.texi')
-
- # Update node-related cross-references. The node-related cross
- # reference definition, long ones specially, could require more
- # than one line to be set. By default, GNU sed does not matches
- # newline characters in the pattern space, so we need to make use
- # of `label' feature and the `N' command in order to build a
- # pattern space that includes the newline character in it. Here we
- # use the `a' letter to name the label we use, followed by N
- # command to add a newline to the pattern space, the s command to
- # make the pattern replacement using the `g' flag to make it
- # global and finaly the command `b' to branch label named `a'.
- sed -r -i ":a;N;s!${NODE_SRC}!${NODE_DST}!g;ba" ${ENTRIES}
-
- # At this point, source documentation entry has been renamed from
- # source to target documentation entry, but they are still
- # commented. So, uncomment them restoring target documentation
- # entries.
- texinfo_restoreCrossReferences "${ENTRY_DST}"
-
-}
diff --git a/Scripts/Functions/Help/Modules/Texinfo/texinfo_renameEntry.sh b/Scripts/Functions/Help/Modules/Texinfo/texinfo_renameEntry.sh
deleted file mode 100755
index 43bf04e..0000000
--- a/Scripts/Functions/Help/Modules/Texinfo/texinfo_renameEntry.sh
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/bash
-#
-# texinfo_renameEntry.sh -- This function renames documentation entries
-# and updates documentation structure to reflect changes.
-#
-# Copyright (C) 2009, 2010, 2011 The CentOS Project
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# ----------------------------------------------------------------------
-# $Id$
-# ----------------------------------------------------------------------
-
-function texinfo_renameEntry {
-
- # Copy source documentation entry.
- texinfo_copyEntry
-
- # Delete source documentation entry. The source documentation
- # entry has been copied already, so to create the rename effect
- # delete it from repository filesystem.
- texinfo_deleteEntry
-
- # At this point, source documentation entry has been removed and
- # all menu, nodes and cross-references have been commented. So,
- # replace commented menu, nodes and cross-reference information
- # from source to target documentation entry.
- texinfo_renameCrossReferences
-
-}
diff --git a/Scripts/Functions/Help/Modules/Texinfo/texinfo_restoreCrossReferences.sh b/Scripts/Functions/Help/Modules/Texinfo/texinfo_restoreCrossReferences.sh
deleted file mode 100755
index fb7016a..0000000
--- a/Scripts/Functions/Help/Modules/Texinfo/texinfo_restoreCrossReferences.sh
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/bin/bash
-#
-# texinfo_restoreCrossReferences.sh -- This function looks inside
-# texinfo source files, from section level on, and restores any cross
-# reference related to a documentation entry. This function is used in
-# those cases where documentation entries are created/recreated to
-# documentation structure. It is a verification that looks for
-# matching documentation entries previously defined as removed by
-# texinfo_deleteCrossReferences function. The
-# texinfo_restoreCrossReferences function relays in the removed
-# message format produced by texinfo_deleteCrossReferences
-# function, in order to return them back into the link format.
-#
-# Copyright (C) 2009, 2010, 2011 The CentOS Project
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# ----------------------------------------------------------------------
-# $Id$
-# ----------------------------------------------------------------------
-
-function texinfo_restoreCrossReferences {
-
- local -a PATTERN
- local -a REPLACE
- local LOCATION=''
-
- # Define entry location. Verify first argument to make this
- # function reusable. If no value is passed as first argument use
- # entry global information value as default value instead.
- if [[ "$1" != '' ]];then
- LOCATION="$1"
- else
- LOCATION="$ENTRY"
- fi
-
- # Build the node string using entry location.
- local NODE=$(echo "$LOCATION" \
- | cut -d / -f8- \
- | tr '/' ' ' \
- | sed -r \
- -e "s/(chapter-intro\.texi|\.texi)$//")
-
- # Define regular expression patterns to match removed message
- # format produced by message_removeCrossReferences function.
- PATTERN[0]="--- @strong\{`gettext "Removed"`\}\((pxref|xref|ref):(${NODE})\) ---"
- PATTERN[1]="^@comment --- `gettext "Removed"`\((\* ${NODE}:(.*)?:(.*)?)\) ---$"
-
- # Define replacement string to turn removed message back to cross
- # reference link.
- REPLACE[0]='@\1{\2}'
- REPLACE[1]='\1'
-
- # Define list of entries to process.
- local ENTRIES=$(cli_getFilesList ${MANUAL_BASEDIR} --pattern='.*\.texi')
-
- # Update node-related cross references. The node-related cross
- # reference definition, long ones specially, could require more
- # than one line to be set. By default, GNU sed does not matches
- # newline characters in the pattern space, so we need to make use
- # of `label' feature and the `N' command in order to build a
- # pattern space that includes the newline character in it. Here we
- # use the `a' letter to name the label we use, followed by N
- # command to add a newline to the pattern space, the s command to
- # make the pattern replacement using the `g' flag to make it
- # global and finaly the command `b' to branch label named `a'.
- sed -r -i ":a;N;s!${PATTERN[0]}!${REPLACE[0]}!g;ba" ${ENTRIES}
-
- # Update menu-related cross references. Menu-related cross
- # references hardly appear in more than one line, so there is no
- # need to complicate the replacement command.
- sed -r -i "s!${PATTERN[1]}!${REPLACE[1]}!" ${ENTRIES}
-
-}
diff --git a/Scripts/Functions/Help/Modules/Texinfo/texinfo_searchIndex.sh b/Scripts/Functions/Help/Modules/Texinfo/texinfo_searchIndex.sh
deleted file mode 100644
index b701660..0000000
--- a/Scripts/Functions/Help/Modules/Texinfo/texinfo_searchIndex.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/bash
-#
-# texinfo_searchIndex.sh -- This function does an index search inside the
-# info document.
-#
-# Copyright (C) 2009, 2010, 2011 The CentOS Project
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# ----------------------------------------------------------------------
-# $Id$
-# ----------------------------------------------------------------------
-
-function texinfo_searchIndex {
-
- # Print action message.
- cli_printMessage "${MANUAL_BASEFILE}.info.bz2" --as-reading-line
-
- # Execute info command to perform an index-search.
- /usr/bin/info --index-search="$FLAG_SEARCH" --file=${MANUAL_BASEFILE}.info.bz2
-
-}
diff --git a/Scripts/Functions/Help/Modules/Texinfo/texinfo_searchNode.sh b/Scripts/Functions/Help/Modules/Texinfo/texinfo_searchNode.sh
deleted file mode 100755
index abbc91f..0000000
--- a/Scripts/Functions/Help/Modules/Texinfo/texinfo_searchNode.sh
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/bash
-#
-# texinfo_searchNode.sh -- This function does a node search inside the
-# info document.
-#
-# Copyright (C) 2009, 2010, 2011 The CentOS Project
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# ----------------------------------------------------------------------
-# $Id$
-# ----------------------------------------------------------------------
-
-function texinfo_searchNode {
-
- # Print action message.
- cli_printMessage "${MANUAL_BASEFILE}.info.bz2" --as-reading-line
-
- # Check entry inside documentation structure. If the entry
- # exits use the info reader to open the info file at the
- # specified node. Otherwise, ask the user for create it.
- if [[ -f "$ENTRY" ]];then
- /usr/bin/info --node="Directories $(texinfo_getNode)" --file=${MANUAL_BASEFILE}.info.bz2
- else
- texinfo_editEntry
- fi
-
-}
diff --git a/Scripts/Functions/Help/Modules/Texinfo/texinfo_updateChaptersFiles.sh b/Scripts/Functions/Help/Modules/Texinfo/texinfo_updateChaptersFiles.sh
deleted file mode 100755
index 99464bb..0000000
--- a/Scripts/Functions/Help/Modules/Texinfo/texinfo_updateChaptersFiles.sh
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/bin/bash
-#
-# texinfo_updateChaptersFiles.sh -- This function updates chapter related
-# files.
-#
-# Copyright (C) 2009, 2010, 2011 The CentOS Project
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# ----------------------------------------------------------------------
-# $Id$
-# ----------------------------------------------------------------------
-
-function texinfo_updateChaptersFiles {
-
- # Define chapter's generic structure.
- local CHAPTERBODY="\
- @node $MANUAL_CHAPTER_NAME
- @chapter $MANUAL_CHAPTER_NAME
- @cindex $(echo $MANUAL_CHAPTER_NAME | tr '[[:upper:]]' '[[:lower:]]')
- @include $MANUAL_CHAPTER_NAME/chapter-intro.texi
- @include $MANUAL_CHAPTER_NAME/chapter-menu.texi
- @include $MANUAL_CHAPTER_NAME/chapter-nodes.texi"
-
- # Remove any space/tabs at the begining of @... lines.
- CHAPTERBODY=$(echo "$CHAPTERBODY" | sed -r 's!^[[:space:]]+@!@!')
-
- # Create directory to store chapter files.
- if [[ ! -d $MANUAL_CHAPTER_DIR ]];then
- mkdir $MANUAL_CHAPTER_DIR
- fi
-
- # Create files to store chapter information. If chapter files
- # already exist, they will be re-written and any previous
- # information inside them will be lost.
- echo "$CHAPTERBODY" > $MANUAL_CHAPTER_DIR/chapter.texi
- echo "" > $MANUAL_CHAPTER_DIR/chapter-menu.texi
- echo "" > $MANUAL_CHAPTER_DIR/chapter-nodes.texi
-
- # Initialize chapter instroduction using template file.
- cp ${MANUAL_TEMPLATE}/manual-chapter-intro.texi $MANUAL_CHAPTER_DIR/chapter-intro.texi
-
-}
diff --git a/Scripts/Functions/Help/Modules/Texinfo/texinfo_updateChaptersMenu.sh b/Scripts/Functions/Help/Modules/Texinfo/texinfo_updateChaptersMenu.sh
deleted file mode 100755
index 20bf963..0000000
--- a/Scripts/Functions/Help/Modules/Texinfo/texinfo_updateChaptersMenu.sh
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/bin/bash
-#
-# texinfo_updateChaptersMenu.sh -- This function updates chapter menu.
-#
-# Copyright (C) 2009, 2010, 2011 The CentOS Project
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# ----------------------------------------------------------------------
-# $Id$
-# ----------------------------------------------------------------------
-
-function texinfo_updateChaptersMenu {
-
- local ACTION=$1
- local MENUCHAPTERS=''
-
- # Build menu of chapters. The Index node is not included as other
- # nodes are. The Index node is defined inside the master texinfo
- # file (repository.texi) as an included file. To create the final
- # .info file correctly, the Index line in the menu should remain,
- # even no other node exist.
- if [[ -f ${MANUAL_BASEFILE}-menu.texi ]];then
- MENUCHAPTERS=$(cat ${MANUAL_BASEFILE}-menu.texi \
- | egrep -v "^(@(end )?menu$|\* Index::.*)$")
- fi
-
- # Re-defined menu of chapters based on action.
- case $ACTION in
- 'remove-entry' )
- # Remove chapter from menu.
- MENUCHAPTERS=$(echo "${MENUCHAPTERS}" \
- | egrep -v "^\* ${MANUAL_CHAPTER_NAME}::[[:print:]]*$")
- ;;
- 'update-entry' | * )
- # Update chapter menu using texinfo format.
- MENUCHAPTERS="${MENUCHAPTERS}
- * ${MANUAL_CHAPTER_NAME}::"
- ;;
- esac
-
- # Remove opening spaces/tabs and empty line from the menu of
- # chapters. Empty lines may occur the first time the menu of
- # chapters is created.
- MENUCHAPTERS=$(echo "${MENUCHAPTERS}" | sed -r 's!^[[:space:]]+!!' \
- | egrep -v '^[[:space:]]*$')
-
- # Organize menu of chapters alphabetically and verify that no
- # duplicated line be included on the list.
- MENUCHAPTERS=$(echo "${MENUCHAPTERS}" | sort | uniq)
-
- # Give format to final menu output.
- MENUCHAPTERS="@menu
- ${MENUCHAPTERS}
- * Index::
- @end menu"
-
- # Strip opening space/tabs from final menu of chapters.
- MENUCHAPTERS=$(echo "${MENUCHAPTERS}" | sed -r 's!^[[:space:]]+!!' \
- | egrep -v '^[[:space:]]*$')
-
- # Dump organized menu of chapters into file.
- echo "${MENUCHAPTERS}" > ${MANUAL_BASEFILE}-menu.texi
-
-}
diff --git a/Scripts/Functions/Help/Modules/Texinfo/texinfo_updateChaptersNodes.sh b/Scripts/Functions/Help/Modules/Texinfo/texinfo_updateChaptersNodes.sh
deleted file mode 100755
index a28f904..0000000
--- a/Scripts/Functions/Help/Modules/Texinfo/texinfo_updateChaptersNodes.sh
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/bash
-#
-# texinfo_updateChaptersNodes.sh -- This function updates nodes of
-# chapters based on menu of chapters.
-#
-# Copyright (C) 2009, 2010, 2011 The CentOS Project
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# ----------------------------------------------------------------------
-# $Id$
-# ----------------------------------------------------------------------
-
-function texinfo_updateChaptersNodes {
-
- # Build list "nodes of chapters" based on menu of chapters.
- local CHAPTERNODES=$(cat ${MANUAL_BASEFILE}-menu.texi \
- | egrep -v '^@(end )?menu$' \
- | egrep -v "^\* `gettext "Index"`::[[:print:]]*$" \
- | sed -r 's!^\* !!' | sed -r 's!::[[:print:]]*$!!g' \
- | sed -r 's! !_!g' | sort | uniq )
-
- # Build list of texinfo inclusions to load chapters' nodes.
- local FILENODE=$(\
- for CHAPTERNODE in ${CHAPTERNODES};do
-
- INCL=$(echo ${CHAPTERNODE} | sed -r "s!(${CHAPTERNODE})!\1/chapter\.texi!")
-
- # Output inclusion line using texinfo format.
- echo "@include $INCL"
-
- done)
-
- # Dump organized nodes of chapters into file.
- echo "$FILENODE" > ${MANUAL_BASEFILE}-nodes.texi
-
-}
diff --git a/Scripts/Functions/Help/Modules/Texinfo/texinfo_updateMenu.sh b/Scripts/Functions/Help/Modules/Texinfo/texinfo_updateMenu.sh
deleted file mode 100755
index b5aa015..0000000
--- a/Scripts/Functions/Help/Modules/Texinfo/texinfo_updateMenu.sh
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/bin/bash
-#
-# texinfo_updateMenu.sh -- This function updates menu lines inside
-# texinfo chapters. If this function is called with the
-# 'remove-entry' string as first argument, then the menu line related
-# to the entry being processed is removed. If this function is called
-# with the 'update-entry' string as first argument, then the menu line
-# related to the entry being processed is added to the menu. If no
-# argument is passed to this function, the 'update-entry' action is
-# assumed.
-#
-# Copyright (C) 2009, 2010, 2011 The CentOS Project
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# ----------------------------------------------------------------------
-# $Id$
-# ----------------------------------------------------------------------
-
-function texinfo_updateMenu {
-
- # Specify which action to do inside chapter's menu.
- local ACTION="$1"
-
- # Build the menu node related to the entry being processed
- # currently.
- local MENUNODE=$(echo "$ENTRY" | cut -d / -f9- | tr '/' ' ' \
- | sed 's!\.texi$!!')
-
- # Give format to menu line using texinfo style.
- local MENULINE="* ${MANUAL_CHAPTER_NAME} $MENUNODE::"
-
- # Define chapter's menu. Remove `@menu', `@end menu', and empty lines
- # from output.
- local MENU=$(cat $MANUAL_CHAPTER_DIR/chapter-menu.texi \
- | egrep -v '^[[:space:]]*$' | egrep -v '^@(end )?menu')
-
- # Re-defined chapter's menu based on action.
- case $ACTION in
- 'remove-entry' )
- # Remove menu line from chapter's menu.
- MENU=$(echo "$MENU" | egrep -v "$MENULINE")
- ;;
- 'update-entry' | * )
- # Add menu line to chapter's menu. This is the default
- # behaivour if no argument is passed to texinfo_updateMenu
- # function.
- MENU="$MENU
- $MENULINE"
- ;;
- esac
-
- # Organize menu alphabetically, remove empty and duplicated lines.
- # At this point, empty line may occur the first time the menu is
- # created, don't let them to scape.
- MENU=$(echo "$MENU" | egrep -v '^[[:space:]]*$' | sort | uniq )
-
- # Rebuild chapter's menu structure adding '@menu' and '@end menu'
- # lines back in menu.
- MENU="@menu
- $MENU
- @end menu"
-
- # Remove opening spaces/tabs from final menu structure.
- MENU=$(echo "$MENU" | sed -r 's!^[[:space:]]+!!g')
-
- # Dump final menu structure back into chapter's menu file.
- echo "$MENU" > $MANUAL_CHAPTER_DIR/chapter-menu.texi
-
-}
diff --git a/Scripts/Functions/Help/Modules/Texinfo/texinfo_updateNodes.sh b/Scripts/Functions/Help/Modules/Texinfo/texinfo_updateNodes.sh
deleted file mode 100755
index c0a0d2a..0000000
--- a/Scripts/Functions/Help/Modules/Texinfo/texinfo_updateNodes.sh
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/bin/bash
-#
-# texinfo_updateNodes.sh -- This function updates chapter's nodes
-# definition using the chapter's menu as reference.
-#
-# Copyright (C) 2009, 2010, 2011 The CentOS Project
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# ----------------------------------------------------------------------
-# $Id$
-# ----------------------------------------------------------------------
-
-function texinfo_updateNodes {
-
- local TEXINFO_TEMPLATE=''
-
- # Retrive nodes' entries from chapter-menu.texi file.
- local NODES=$(cat $MANUAL_CHAPTER_DIR/chapter-menu.texi \
- | sed -r 's!^\* !!' | sed -r 's!:{1,2}.*$!!g' \
- | egrep -v '^@(end )?menu$' | sed -r 's! !:!g' | sort | uniq)
-
- # Re-build node structure based on menu information.
- for NODE in $NODES;do
-
- NODE=$(echo "${NODE}" | sed -r 's!:! !g')
- SECT=$(echo "$NODE" | sed -r 's! !/!g' | sed "s!${MANUAL_CHAPTER_NAME}/!!")
- INCL=$(echo "$NODE" | sed -r 's! !/!g').texi
- CIND=$(echo "$NODE")
-
- # Create an empty directory to store texinfo files.
- if [[ ! -d ${MANUAL_BASEDIR}/$(dirname "$INCL") ]];then
- mkdir -p ${MANUAL_BASEDIR}/$(dirname "$INCL")
- fi
-
- # Create texinfo section file using templates.
- if [[ ! -f ${MANUAL_BASEDIR}/$INCL ]];then
-
- # Define what template to apply using the absolute path of
- # the documentation entry as reference.
- if [[ ${MANUAL_BASEDIR}/${INCL} =~ 'trunk/Scripts/Functions/.+' ]];then
- TEXINFO_TEMPLATE="${MANUAL_TEMPLATE}/manual-section-functions.texi"
- else
- TEXINFO_TEMPLATE="${MANUAL_TEMPLATE}/manual-section.texi"
- fi
-
- # Copy template to its destination.
- cp ${TEXINFO_TEMPLATE} ${MANUAL_BASEDIR}/$INCL
-
- # Expand common translation markers.
- cli_replaceTMarkers "${MANUAL_BASEDIR}/$INCL"
-
- # Expand texinfo-specific translation markers.
- ${FUNCNAM}_makeSeeAlso "${MANUAL_BASEDIR}/$INCL" "$NODE"
-
- fi
-
- # Output node information based on texinfo menu.
- echo "@node $NODE"
- echo "@section `eval_gettext "The @file{\\\$SECT} Directory"`"
- echo "@cindex $CIND"
- echo "@include $INCL"
- echo ""
-
- # Dump node information into chapter node file.
- done > $MANUAL_CHAPTER_DIR/chapter-nodes.texi
-
-}
diff --git a/Scripts/Functions/Help/Modules/Texinfo/texinfo_updateOutputFileInfo.sh b/Scripts/Functions/Help/Modules/Texinfo/texinfo_updateOutputFileInfo.sh
deleted file mode 100755
index 8407d95..0000000
--- a/Scripts/Functions/Help/Modules/Texinfo/texinfo_updateOutputFileInfo.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/bash
-#
-# texinfo_updateOutputFileInfo.sh -- This function exports
-# documentation manual to info format.
-#
-# Copyright (C) 2009, 2010, 2011 The CentOS Project
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# ----------------------------------------------------------------------
-# $Id$
-# ----------------------------------------------------------------------
-
-function texinfo_updateOutputFileInfo {
-
- # Output action message.
- cli_printMessage "${MANUAL_BASEFILE}.info.bz2" --as-updating-line
-
- # Update info file.
- /usr/bin/makeinfo ${MANUAL_BASEFILE}.texi --output=${MANUAL_BASEFILE}.info
-
- # Compress info file.
- if [[ $? -eq 0 ]];then
- bzip2 -f ${MANUAL_BASEFILE}.info
- fi
-
-}
diff --git a/Scripts/Functions/Help/Modules/Texinfo/texinfo_updateOutputFilePdf.sh b/Scripts/Functions/Help/Modules/Texinfo/texinfo_updateOutputFilePdf.sh
deleted file mode 100755
index e4e4b99..0000000
--- a/Scripts/Functions/Help/Modules/Texinfo/texinfo_updateOutputFilePdf.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/bash
-#
-# texinfo_updateOutputFilePdf.sh -- This function exports documentation
-# manual to PDF format.
-#
-# Copyright (C) 2009, 2010, 2011 The CentOS Project
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# ----------------------------------------------------------------------
-# $Id$
-# ----------------------------------------------------------------------
-
-function texinfo_updateOutputFilePdf {
-
- # Output action message.
- cli_printMessage "${MANUAL_BASEFILE}.pdf" --as-updating-line
-
- # Update plaintext output directory.
- /usr/bin/texi2pdf --quiet \
- ${MANUAL_BASEFILE}.texi --output=${MANUAL_BASEFILE}.pdf
-
-}
diff --git a/Scripts/Functions/Help/Modules/Texinfo/texinfo_updateOutputFilePlaintext.sh b/Scripts/Functions/Help/Modules/Texinfo/texinfo_updateOutputFilePlaintext.sh
deleted file mode 100755
index 8601513..0000000
--- a/Scripts/Functions/Help/Modules/Texinfo/texinfo_updateOutputFilePlaintext.sh
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/bash
-#
-# texinfo_updateOutputFilePlaintext.sh -- This function exports
-# documentation manual to plain-text format.
-#
-# Copyright (C) 2009, 2010, 2011 The CentOS Project
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# ----------------------------------------------------------------------
-# $Id$
-# ----------------------------------------------------------------------
-
-function texinfo_updateOutputFilePlaintext {
-
- # Output action message.
- cli_printMessage "${MANUAL_BASEFILE}.txt.bz2" --as-updating-line
-
- # Update plaintext output directory.
- /usr/bin/makeinfo --plaintext \
- ${MANUAL_BASEFILE}.texi --output=${MANUAL_BASEFILE}.txt
-
- # Compress plaintext output file.
- if [[ -f ${MANUAL_BASEFILE}.txt ]];then
- bzip2 ${MANUAL_BASEFILE}.txt --force
- fi
-
-}
diff --git a/Scripts/Functions/Help/Modules/Texinfo/texinfo_updateOutputFileXhtml.sh b/Scripts/Functions/Help/Modules/Texinfo/texinfo_updateOutputFileXhtml.sh
deleted file mode 100755
index 168b5c4..0000000
--- a/Scripts/Functions/Help/Modules/Texinfo/texinfo_updateOutputFileXhtml.sh
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/bin/bash
-#
-# texinfo_updateOutputFileXhtml.sh -- This function exports
-# documentation manual to HTML format.
-#
-# Copyright (C) 2009, 2010, 2011 The CentOS Project
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# ----------------------------------------------------------------------
-# $Id$
-# ----------------------------------------------------------------------
-
-function texinfo_updateOutputFileXhtml {
-
- # Output action message.
- cli_printMessage "${MANUAL_BASEFILE}.xhtml.tar.bz2" --as-updating-line
-
- # Redefine manual base file to use just the file base name.
- local MANUAL_BASEFILE=$(basename "$MANUAL_BASEFILE")
-
- # Add manual base directory path into directory stack to make it
- # the current working directory. This is done to reduce the path
- # information packaged inside `repository.xhtml.tar.bz2' file.
- pushd ${MANUAL_BASEDIR} > /dev/null
-
- # Prepare directory structure where xhtml files will be stored in.
- [[ ! -d ${MANUAL_BASEFILE}.xhtml ]] && mkdir -p ${MANUAL_BASEFILE}.xhtml
-
- # Clean up directory structure where xhtml files will be stored.
- # We don't want to have unused files inside it.
- [[ $(ls ${MANUAL_BASEFILE}.xhtml > /dev/null) ]] && rm ${MANUAL_BASEFILE}.xhtml/*.xhtml
-
- # Add directory where xhtml files will be sotred in into directory
- # stack to make it the current working directory. This is required
- # in order for include paths to be constructed correctly.
- pushd ${MANUAL_BASEFILE}.xhtml > /dev/null
-
- # Update xhtml files. Use texi2html to export from texinfo file
- # format to html using CentOS Web default visual style.
- texi2html --init-file=${MANUAL_BASEDIR}/${MANUAL_BASEFILE}-init.pl \
- --output=${MANUAL_BASEDIR}/${MANUAL_BASEFILE}.xhtml \
- ${MANUAL_BASEDIR}/${MANUAL_BASEFILE}.texi
-
- # Remove directory where xhtml files are stored from directory
- # stack. The xhtml files have been already created.
- popd > /dev/null
-
- # Apply xhtml transformations. This transformation cannot be built
- # inside the initialization script (repository.init). For example,
- # I can't see a possible way to produce different quotation HTML
- # outputs from the same texinfo quotation definition. Instead,
- # once the HTML code is produced we can take que quotation HTML
- # definition plus the first letters inside it and transform the
- # structure to a completly different thing that can be handle
- # through classed inside CSS definitions.
- sed -r -i -f ${MANUAL_BASEFILE}.sed ${MANUAL_BASEFILE}.xhtml/*.xhtml
-
- # Compress directory structure where xhtml files are stored in.
- # This compressed version is the one we put under version control.
- # The directory used to build the compressed version is left
- # unversion for the matter of human revision.
- tar -cjf ${MANUAL_BASEFILE}.xhtml.tar.bz2 ${MANUAL_BASEFILE}.xhtml
-
- # Remove manual base directory from directory stack.
- popd > /dev/null
-
-}
diff --git a/Scripts/Functions/Help/Modules/Texinfo/texinfo_updateOutputFileXml.sh b/Scripts/Functions/Help/Modules/Texinfo/texinfo_updateOutputFileXml.sh
deleted file mode 100755
index acdc47b..0000000
--- a/Scripts/Functions/Help/Modules/Texinfo/texinfo_updateOutputFileXml.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/bash
-#
-# texinfo_updateOutputFileXml.sh -- This function exports documentation
-# manual to XML format.
-#
-# Copyright (C) 2009, 2010, 2011 The CentOS Project
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# ----------------------------------------------------------------------
-# $Id$
-# ----------------------------------------------------------------------
-
-function texinfo_updateOutputFileXml {
-
- # Print action message.
- cli_printMessage "${MANUAL_BASEFILE}.xml" --as-updating-line
-
- # Update xml output format.
- /usr/bin/makeinfo --xml \
- ${MANUAL_BASEFILE}.texi --output=${MANUAL_BASEFILE}.xml \
-
-}
diff --git a/Scripts/Functions/Help/Modules/Texinfo/texinfo_updateOutputFiles.sh b/Scripts/Functions/Help/Modules/Texinfo/texinfo_updateOutputFiles.sh
deleted file mode 100755
index 9e44c62..0000000
--- a/Scripts/Functions/Help/Modules/Texinfo/texinfo_updateOutputFiles.sh
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/bash
-#
-# texinfo_updateOutputFiles.sh -- This function exports documentation
-# manual to different output formats.
-#
-# Copyright (C) 2009, 2010, 2011 The CentOS Project
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# ----------------------------------------------------------------------
-# $Id$
-# ----------------------------------------------------------------------
-
-function texinfo_updateOutputFiles {
-
- # Print separator line.
- cli_printMessage '-' --as-separator-line
-
- # Add the working copy root directory to directory stack to make
- # path construction correctly. Otherwise, makeinfo may produce
- # paths incorrectly.
- pushd ${HOME}/artwork > /dev/null
-
- texinfo_updateOutputFileInfo
- texinfo_updateOutputFileXhtml
- texinfo_updateOutputFileXml
- texinfo_updateOutputFilePdf
- texinfo_updateOutputFilePlaintext
-
- # Remove the working copy root directory from directory stack.
- popd > /dev/null
-
-}