|
|
4c79b5 |
#!/bin/bash
|
|
|
4c79b5 |
#
|
|
|
0211a4 |
# help_updateNodes.sh -- This function updates chapter's nodes
|
|
|
4c79b5 |
|
|
|
4c79b5 |
#
|
|
|
9f5f2e |
# Copyright (C) 2009-2011 Alain Reguera Delgado
|
|
|
4c79b5 |
#
|
|
|
7cd8e9 |
# This program is free software; you can redistribute it and/or
|
|
|
7cd8e9 |
|
|
|
7cd8e9 |
|
|
|
7cd8e9 |
|
|
|
4c79b5 |
#
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
# General Public License for more details.
|
|
|
4c79b5 |
#
|
|
|
4c79b5 |
|
|
|
4c79b5 |
# along with this program; if not, write to the Free Software
|
|
|
4c79b5 |
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
|
|
4c79b5 |
# USA.
|
|
|
4c79b5 |
#
|
|
|
4c79b5 |
# ----------------------------------------------------------------------
|
|
|
418249 |
# $Id$
|
|
|
4c79b5 |
# ----------------------------------------------------------------------
|
|
|
4c79b5 |
|
|
|
0211a4 |
function help_updateNodes {
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
7f7f8f |
local NODES=$(cat $MANUAL_CHAPTER_DIR/chapter-menu.texi \
|
|
|
4c79b5 |
| sed -r 's!^\* !!' | sed -r 's!:{1,2}.*$!!g' \
|
|
|
4c79b5 |
| egrep -v '^@(end )?menu$' | sed -r 's! !:!g' | sort | uniq)
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
for NODE in $NODES;do
|
|
|
4c79b5 |
|
|
|
fa17ed |
NODE=$(echo "${NODE}" | sed -r 's!:! !g')
|
|
|
fa17ed |
SECT=$(echo "$NODE" | sed -r 's! !/!g' | sed "s!${MANUAL_CHAPTER_NAME}/!!")
|
|
|
ddf424 |
INCL=$(echo "$NODE" | sed -r 's! !/!g').texi
|
|
|
ddf424 |
CIND=$(echo "$NODE")
|
|
|
4c79b5 |
|
|
|
5285d6 |
|
|
|
759d18 |
if [[ ! -d ${MANUAL_BASEDIR}/$(dirname "$INCL") ]];then
|
|
|
759d18 |
mkdir -p ${MANUAL_BASEDIR}/$(dirname "$INCL")
|
|
|
4c79b5 |
fi
|
|
|
4c79b5 |
|
|
|
4c79b5 |
# Create texinfo section file using its template.
|
|
|
759d18 |
if [[ ! -f ${MANUAL_BASEDIR}/$INCL ]];then
|
|
|
759d18 |
cp ${FUNCCONFIG}/manual-section.texi ${MANUAL_BASEDIR}/$INCL
|
|
|
4c79b5 |
fi
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
4c79b5 |
echo "@node $NODE"
|
|
|
fa17ed |
echo "@section `eval_gettext "The @file{\\\$SECT} Directory"`"
|
|
|
4c79b5 |
echo "@cindex $CIND"
|
|
|
4c79b5 |
echo "@include $INCL"
|
|
|
4c79b5 |
echo ""
|
|
|
4c79b5 |
|
|
|
4c79b5 |
|
|
|
7f7f8f |
done > $MANUAL_CHAPTER_DIR/chapter-nodes.texi
|
|
|
4c79b5 |
|
|
|
4c79b5 |
}
|
|
|
4c79b5 |
|