|
|
4c79b5 |
#!/bin/bash
|
|
|
4c79b5 |
#
|
|
|
0211a4 |
# help_deleteEntry.sh -- This function removes a documentation entry
|
|
|
5285d6 |
# from documentation directory structure.
|
|
|
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_deleteEntry {
|
|
|
4c79b5 |
|
|
|
3385aa |
local ENTRY_SRC=${ENTRY}
|
|
|
4c79b5 |
local ENTRIES=''
|
|
|
3385aa |
local ENTRY=''
|
|
|
3385aa |
local ENTRY_DEP=''
|
|
|
4c79b5 |
|
|
|
449927 |
|
|
|
449927 |
|
|
|
3385aa |
ENTRIES=${ENTRY_SRC}
|
|
|
449927 |
|
|
|
449927 |
|
|
|
449927 |
|
|
|
449927 |
|
|
|
449927 |
if [[ -d ${ENTRY_DIR}/${ENTRY_FILE} ]];then
|
|
|
449927 |
|
|
|
3385aa |
|
|
|
449927 |
ENTRIES="${ENTRIES} $(cli_getFilesList "${ENTRY_DIR}/${ENTRY_FILE}" ".*\.texi")"
|
|
|
449927 |
|
|
|
3385aa |
|
|
|
3385aa |
|
|
|
3385aa |
for ENTRY in ${ENTRIES};do
|
|
|
3385aa |
ENTRY_DEP=$(echo $ENTRY | sed -r "s/\.texi$//")
|
|
|
3385aa |
if [[ -d $ENTRY_DEP ]];then
|
|
|
3385aa |
ENTRIES="${ENTRIES} ${ENTRY_DEP}"
|
|
|
3385aa |
fi
|
|
|
3385aa |
done
|
|
|
4c79b5 |
|
|
|
4c79b5 |
fi
|
|
|
4c79b5 |
|
|
|
449927 |
# Prepare list of entries for action preamble.
|
|
|
3385aa |
ENTRIES=$(echo ${ENTRIES} | tr ' ' "\n" | sort -r | uniq)
|
|
|
5285d6 |
|
|
|
638bf8 |
|
|
|
638bf8 |
cli_printActionPreamble "$ENTRIES" 'doDelete' 'AsResponseLine'
|
|
|
638bf8 |
|
|
|
3385aa |
|
|
|
3385aa |
|
|
|
3385aa |
|
|
|
3385aa |
|
|
|
3385aa |
|
|
|
3385aa |
|
|
|
3385aa |
|
|
|
3385aa |
|
|
|
3385aa |
|
|
|
3385aa |
svn del ${ENTRIES} --quiet
|
|
|
136786 |
if [[ $? -ne 0 ]];then
|
|
|
eee226 |
cli_printMessage "${FUNCDIRNAM}" 'AsToKnowMoreLine'
|
|
|
136786 |
fi
|
|
|
4456e8 |
|
|
|
449927 |
# Print separator line.
|
|
|
449927 |
cli_printMessage '-' 'AsSeparatorLine'
|
|
|
449927 |
|
|
|
449927 |
|
|
|
3385aa |
cli_printMessage "Updating manual menus, nodes and cross-references." 'AsResponseLine'
|
|
|
449927 |
|
|
|
449927 |
# Process list of entries in order to update menus, nodes and
|
|
|
449927 |
|
|
|
449927 |
|
|
|
449927 |
# remove files. This would modify some file before be removed and
|
|
|
449927 |
# that would stop script execution. Similary, if we do update
|
|
|
449927 |
|
|
|
449927 |
# be needed to remove farther status verification in order for the
|
|
|
449927 |
|
|
|
449927 |
|
|
|
449927 |
|
|
|
449927 |
|
|
|
3385aa |
for ENTRY in ${ENTRIES};do
|
|
|
3385aa |
|
|
|
3385aa |
|
|
|
3385aa |
|
|
|
3385aa |
|
|
|
3385aa |
if [[ ! -f $ENTRY ]];then
|
|
|
3385aa |
continue
|
|
|
3385aa |
fi
|
|
|
4456e8 |
|
|
|
449927 |
|
|
|
449927 |
|
|
|
0211a4 |
help_updateMenu "remove-entry"
|
|
|
0211a4 |
help_updateNodes
|
|
|
4456e8 |
|
|
|
449927 |
|
|
|
449927 |
|
|
|
0211a4 |
help_deleteCrossReferences
|
|
|
f8fb31 |
|
|
|
4456e8 |
done
|
|
|
4456e8 |
|
|
|
449927 |
|
|
|
449927 |
|
|
|
449927 |
|
|
|
7f7f8f |
if [[ ! -d $MANUAL_CHAPTER_DIR ]];then
|
|
|
0211a4 |
help_updateChaptersMenu 'remove-entry'
|
|
|
0211a4 |
help_updateChaptersNodes
|
|
|
4c79b5 |
fi
|
|
|
4c79b5 |
|
|
|
4c79b5 |
}
|