Blame Scripts/CentOS-Art/Functions/Help/Texinfo/texinfo_deleteEntrySection.sh

d92dde
#!/bin/bash
d92dde
#
d92dde
# texinfo_deleteEntrySection.sh -- This function standardized section
d92dde
# deletion inside the manual structure.
d92dde
#
2fe9b7
# Copyright (C) 2009, 2010, 2011 The CentOS Project
d92dde
#
d92dde
# This program is free software; you can redistribute it and/or modify
d92dde
# it under the terms of the GNU General Public License as published by
d92dde
# the Free Software Foundation; either version 2 of the License, or (at
d92dde
# your option) any later version.
d92dde
#
d92dde
# This program is distributed in the hope that it will be useful, but
d92dde
# WITHOUT ANY WARRANTY; without even the implied warranty of
d92dde
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
d92dde
# General Public License for more details.
d92dde
#
d92dde
# You should have received a copy of the GNU General Public License
d92dde
# along with this program; if not, write to the Free Software
d92dde
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
d92dde
#
d92dde
# ----------------------------------------------------------------------
d92dde
# $Id$
d92dde
# ----------------------------------------------------------------------
d92dde
d92dde
function texinfo_deleteEntrySection {
d92dde
c572ed
    # Print action message.
c572ed
    cli_printMessage "$MANUAL_ENTRY" --as-deleting-line
c572ed
c572ed
    # Verify existence of documentation entry before deleting it. We
c572ed
    # cannot delete an entry which doesn't exist.
c572ed
    cli_checkFiles "$MANUAL_ENTRY"
c572ed
c572ed
    # Revert pending changes inside the section entry in order to
c572ed
    # prepare the file for deletion.
c572ed
    svn revert $MANUAL_ENTRY --quiet
c572ed
d92dde
    # Remove documentation entry using subversion to register the
d92dde
    # change.
d92dde
    svn del $MANUAL_ENTRY --quiet
d92dde
d92dde
    # Update section menu, nodes and cross references.
ef43e2
    texinfo_updateStructureSection "${MANUAL_ENTRY}" --delete
d92dde
d92dde
}