Blame Scripts/Bash/Cli/Functions/Help/document_renameEntry.sh

9f4d86
#!/bin/bash
9f4d86
#
9ebc53
# document_renameEntry.sh -- This function renames documentation entries
9f4d86
# and updates documentation structure to reflect changes.
9f4d86
#
9f4d86
# Copyright (C) 2009-2011 Alain Reguera Delgado
9f4d86
# 
9f4d86
# This program is free software; you can redistribute it and/or
9f4d86
# modify it under the terms of the GNU General Public License as
9f4d86
# published by the Free Software Foundation; either version 2 of the
9f4d86
# License, or (at your option) any later version.
9f4d86
# 
9f4d86
# This program is distributed in the hope that it will be useful, but
9f4d86
# 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
9f4d86
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
9f4d86
# USA.
9f4d86
# 
9f4d86
# ----------------------------------------------------------------------
9f4d86
# $Id$
9f4d86
# ----------------------------------------------------------------------
9f4d86
9ebc53
function document_renameEntry {
9f4d86
9f4d86
    # Copy source documentation entry.
9ebc53
    document_copyEntry
9f4d86
9f4d86
    # Print separator line.
9f4d86
    cli_printMessage '-' 'AsSeparatorLine'
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.
9ebc53
    document_deleteEntry
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.
9ebc53
    document_renameCrossReferences 
9f4d86
9f4d86
}