|
|
878a2b |
#!/bin/bash
|
|
|
878a2b |
#
|
|
|
878a2b |
# texinfo_renameEntryManual.sh -- This function standardizes renaming
|
|
|
878a2b |
# tasks related to documenation manuals written in texinfo format
|
|
|
878a2b |
# inside the working copy.
|
|
|
878a2b |
#
|
|
|
03486a |
# Copyright (C) 2009, 2010, 2011, 2012 The CentOS Project
|
|
|
878a2b |
#
|
|
|
878a2b |
# This program is free software; you can redistribute it and/or modify
|
|
|
878a2b |
# it under the terms of the GNU General Public License as published by
|
|
|
878a2b |
# the Free Software Foundation; either version 2 of the License, or (at
|
|
|
878a2b |
# your option) any later version.
|
|
|
878a2b |
#
|
|
|
878a2b |
# This program is distributed in the hope that it will be useful, but
|
|
|
878a2b |
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
878a2b |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
878a2b |
# General Public License for more details.
|
|
|
878a2b |
#
|
|
|
878a2b |
# You should have received a copy of the GNU General Public License
|
|
|
878a2b |
# along with this program; if not, write to the Free Software
|
|
|
878a2b |
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
878a2b |
#
|
|
|
878a2b |
# ----------------------------------------------------------------------
|
|
|
878a2b |
# $Id$
|
|
|
878a2b |
# ----------------------------------------------------------------------
|
|
|
878a2b |
|
|
|
878a2b |
function texinfo_renameEntryManual {
|
|
|
878a2b |
|
|
|
878a2b |
# Copy section source entry to target location.
|
|
|
878a2b |
texinfo_copyEntryManual
|
|
|
878a2b |
|
|
|
878a2b |
# Delete section source entry.
|
|
|
878a2b |
texinfo_deleteEntryManual
|
|
|
878a2b |
|
|
|
878a2b |
# Redefine absolute paths to changed directories. This is
|
|
|
bb49dc |
# required in order for `cli_synchronizeRepoChanges' to be aware
|
|
|
bb49dc |
# of manual source and target locations we've just renamed.
|
|
|
878a2b |
MANUAL_CHANGED_DIRS="${MANUAL_BASEDIR} $(echo $MANUAL_BASEDIR \
|
|
|
878a2b |
| sed -r "s!${MANUAL_DIRN[${MANUAL_DOCENTRY_ID}]}!${MANUAL_DIRN[((${MANUAL_DOCENTRY_ID} + 1))]}!")"
|
|
|
878a2b |
|
|
|
878a2b |
# From this time on, the manual information set so far is no
|
|
|
878a2b |
# longer useful. Redefine it to start using the new manual
|
|
|
878a2b |
# information instead.
|
|
|
878a2b |
|
|
|
878a2b |
# Redefine manual name using manual name passed to `centos-art.sh'
|
|
|
878a2b |
# script as second non-option argument.
|
|
|
878a2b |
MANUAL_NAME=${MANUAL_SLFN[((${MANUAL_DOCENTRY_ID} + 1))]}
|
|
|
878a2b |
|
|
|
878a2b |
# Redefine absolute path to manual directory using manual name
|
|
|
878a2b |
# passed to `centos-art.sh' script as second non-option argument.
|
|
|
878a2b |
MANUAL_BASEDIR="$(echo $MANUAL_BASEDIR \
|
|
|
878a2b |
| sed -r "s!${MANUAL_DIRN[${MANUAL_DOCENTRY_ID}]}!${MANUAL_DIRN[((${MANUAL_DOCENTRY_ID} + 1))]}!")"
|
|
|
878a2b |
|
|
|
878a2b |
# Redefine absolute path to manual directory using manual name
|
|
|
878a2b |
# passed to `centos-art.sh' script as second non-option argument.
|
|
|
878a2b |
MANUAL_BASEDIR_L10N="${MANUAL_BASEDIR}/${MANUAL_L10N}"
|
|
|
878a2b |
|
|
|
878a2b |
# Redefine absolute path to base file using manual name passed to
|
|
|
878a2b |
# `centos-art.sh' script as second non-option argument.
|
|
|
878a2b |
MANUAL_BASEFILE="${MANUAL_BASEDIR_L10N}/${MANUAL_NAME}"
|
|
|
878a2b |
|
|
|
878a2b |
}
|