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