Blame Scripts/Functions/Help/Texinfo/texinfo_renameEntry.sh

9f4d86
#!/bin/bash
9f4d86
#
993f6a
# texinfo_renameEntry.sh -- This function renames documentation entries
9f4d86
# and updates documentation structure to reflect changes.
9f4d86
#
3b0984
# Copyright (C) 2009, 2010, 2011 The CentOS Artwork SIG
fa95b1
#
fa95b1
# This program is free software; you can redistribute it and/or modify
fa95b1
# it under the terms of the GNU General Public License as published by
dcd347
# the Free Software Foundation; either version 2 of the License, or (at
dcd347
# your option) any later version.
fa95b1
#
74a058
# This program is distributed in the hope that it will be useful, but
74a058
# WITHOUT ANY WARRANTY; without even the implied warranty of
9f4d86
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
9f4d86
# General Public License for more details.
9f4d86
#
9f4d86
# You should have received a copy of the GNU General Public License
9f4d86
# along with this program; if not, write to the Free Software
dcd347
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
7ac5a5
#
9f4d86
# ----------------------------------------------------------------------
9f4d86
# $Id$
9f4d86
# ----------------------------------------------------------------------
9f4d86
993f6a
function texinfo_renameEntry {
9f4d86
9f4d86
    # Copy source documentation entry.
448d34
    ${MANUAL_BACKEND}_copyEntry "$1" "$2"
9f4d86
9f4d86
    # Delete source documentation entry. The source documentation
9f4d86
    # entry has been copied already, so to create the rename effect
9f4d86
    # delete it from repository filesystem.
448d34
    ${MANUAL_BACKEND}_deleteEntry "$1"
9f4d86
9f4d86
    # At this point, source documentation entry has been removed and
9f4d86
    # all menu, nodes and cross-references have been commented. So,
9f4d86
    # replace commented menu, nodes and cross-reference information
9f4d86
    # from source to target documentation entry.
448d34
    ${MANUAL_BACKEND}_renameCrossReferences "$1" "$2"
9f4d86
9f4d86
}