|
|
878a2b |
#!/bin/bash
|
|
|
878a2b |
#
|
|
|
878a2b |
# texinfo_deleteEntryManual.sh -- This function standardized manual
|
|
|
878a2b |
# deletion 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_deleteEntryManual {
|
|
|
878a2b |
|
|
|
878a2b |
# Print action message.
|
|
|
878a2b |
cli_printMessage "$MANUAL_ENTRY" --as-deleting-line
|
|
|
878a2b |
|
|
|
878a2b |
# Verify existence of documentation entry before deleting it. We
|
|
|
878a2b |
# cannot delete an entry which doesn't exist.
|
|
|
142a1e |
cli_checkFiles "$MANUAL_ENTRY" -f
|
|
|
878a2b |
|
|
|
878a2b |
# Remove locale-specific documentation manual directory from the
|
|
|
878a2b |
# working copy. Using subversion to register the change. Be sure
|
|
|
878a2b |
# that related output files are removed too.
|
|
|
3b9515 |
cli_runFnEnvironment vcs --quiet --delete ${MANUAL_BASEDIR_L10N}
|
|
|
878a2b |
|
|
|
878a2b |
# Verify manual base directory. When the locale-specific
|
|
|
142a1e |
# documentation manual is the last one inside the manual base
|
|
|
878a2b |
# directory, remove the manual base directory from the working
|
|
|
878a2b |
# copy. There is no need to have an empty manual base directories
|
|
|
878a2b |
# inside the working copy.
|
|
|
878a2b |
if [[ $(ls -1 $MANUAL_BASEDIR | wc -l) -le 1 ]];then
|
|
|
878a2b |
|
|
|
878a2b |
# Remove manual base directory.
|
|
|
3b9515 |
cli_runFnEnvironment vcs --delete ${MANUAL_BASEDIR}
|
|
|
878a2b |
|
|
|
878a2b |
# Redefine absolute paths to changed directory. This is
|
|
|
3b9515 |
# required in order for `subversion_commitRepoChanges' to be
|
|
|
3b9515 |
# aware that we are deleting MANUAL_BASEDIR, not
|
|
|
878a2b |
# MANUAL_BASEDIR_L10N.
|
|
|
878a2b |
MANUAL_CHANGED_DIRS="${MANUAL_BASEDIR}"
|
|
|
878a2b |
|
|
|
878a2b |
fi
|
|
|
878a2b |
|
|
|
878a2b |
}
|