|
|
d92dde |
#!/bin/bash
|
|
|
d92dde |
#
|
|
|
d92dde |
# texinfo_deleteEntryManual.sh -- This function standardized manual
|
|
|
d92dde |
# deletion inside the working copy.
|
|
|
d92dde |
#
|
|
|
d92dde |
# Copyright (C) 2009, 2010, 2011 The CentOS Artwork SIG
|
|
|
d92dde |
#
|
|
|
d92dde |
# This program is free software; you can redistribute it and/or modify
|
|
|
d92dde |
# it under the terms of the GNU General Public License as published by
|
|
|
d92dde |
# the Free Software Foundation; either version 2 of the License, or (at
|
|
|
d92dde |
# your option) any later version.
|
|
|
d92dde |
#
|
|
|
d92dde |
# This program is distributed in the hope that it will be useful, but
|
|
|
d92dde |
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
d92dde |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
d92dde |
# General Public License for more details.
|
|
|
d92dde |
#
|
|
|
d92dde |
# You should have received a copy of the GNU General Public License
|
|
|
d92dde |
# along with this program; if not, write to the Free Software
|
|
|
d92dde |
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
d92dde |
#
|
|
|
d92dde |
# ----------------------------------------------------------------------
|
|
|
d92dde |
# $Id$
|
|
|
d92dde |
# ----------------------------------------------------------------------
|
|
|
d92dde |
|
|
|
d92dde |
function texinfo_deleteEntryManual {
|
|
|
d92dde |
|
|
|
c572ed |
# Print action message.
|
|
|
c572ed |
cli_printMessage "$MANUAL_ENTRY" --as-deleting-line
|
|
|
c572ed |
|
|
|
c572ed |
# Verify existence of documentation entry before deleting it. We
|
|
|
c572ed |
# cannot delete an entry which doesn't exist.
|
|
|
c572ed |
cli_checkFiles "$MANUAL_ENTRY"
|
|
|
c572ed |
|
|
|
c572ed |
# Revert pending changes before deleting.
|
|
|
c572ed |
svn revert ${MANUAL_BASEDIR_L10N} --quiet --recursive
|
|
|
c572ed |
|
|
|
d92dde |
# Remove locale-specific documentation manual directory from the
|
|
|
d92dde |
# working copy. Using subversion to register the change. Be sure
|
|
|
d92dde |
# that related output files are removed too.
|
|
|
d92dde |
svn del ${MANUAL_BASEDIR_L10N} --quiet --force
|
|
|
d92dde |
|
|
|
d92dde |
# Verify manual base directory. When the locale-specific
|
|
|
d92dde |
# documentaion manual is the last one inside the manual base
|
|
|
d92dde |
# directory, remove the manual base directory from the working
|
|
|
d92dde |
# copy. There is no need to have an empty manual base directories
|
|
|
d92dde |
# inside the working copy.
|
|
|
d92dde |
if [[ $(ls -1 $MANUAL_BASEDIR | wc -l) -le 1 ]];then
|
|
|
d92dde |
|
|
|
d92dde |
# Remove manual base directory.
|
|
|
d92dde |
svn del ${MANUAL_BASEDIR} --quiet
|
|
|
d92dde |
|
|
|
d92dde |
# Commit changes from working copy to central repository only.
|
|
|
d92dde |
# At this point, changes in the repository are not merged in
|
|
|
d92dde |
# the working copy, but chages in the working copy do are
|
|
|
d92dde |
# committed up to repository.
|
|
|
d92dde |
cli_commitRepoChanges ${MANUAL_BASEDIR}
|
|
|
d92dde |
|
|
|
d92dde |
else
|
|
|
d92dde |
|
|
|
d92dde |
# Commit changes from working copy to central repository only.
|
|
|
d92dde |
# At this point, changes in the repository are not merged in
|
|
|
d92dde |
# the working copy, but chages in the working copy do are
|
|
|
d92dde |
# committed up to repository.
|
|
|
d92dde |
cli_commitRepoChanges ${MANUAL_BASEDIR_L10N}
|
|
|
d92dde |
|
|
|
d92dde |
fi
|
|
|
d92dde |
|
|
|
d92dde |
# Terminate script execution here. The documentation manual has
|
|
|
d92dde |
# been removed and there is nothing else to do here.
|
|
|
d92dde |
exit
|
|
|
d92dde |
|
|
|
d92dde |
}
|