From 1a165830400b72ec7d6a9b2b66ac8c427b201374 Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Nov 10 2010 16:03:50 +0000 Subject: Remove help_addNewFilesToWorkingCopy. Use cli_commitRepoChanges functionality instead. --- diff --git a/Scripts/Bash/Functions/Help/help_addNewFilesToWorkingCopy.sh b/Scripts/Bash/Functions/Help/help_addNewFilesToWorkingCopy.sh deleted file mode 100644 index d750a3b..0000000 --- a/Scripts/Bash/Functions/Help/help_addNewFilesToWorkingCopy.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -# -# help_addNewFilesToWorkingCopy.sh -- This function looks for files -# under the root documentation structure that are not versioned and -# adds them to the working copy under version control. -# -# Copyright (C) 2009, 2010 Alain Reguera Delgado -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA. -# -# ---------------------------------------------------------------------- -# $Id$ -# ---------------------------------------------------------------------- - -function help_addNewFilesToWorkingCopy { - - local LOCATION=$1 - - # Restrict files addition to your working copy only. - if [[ ! $LOCATION =~ '^/home/centos/artwork/' ]];then - cli_printMessage "`gettext "Only files under /home/centos/artwork please."`" - cli_printMessage "$(caller)" "AsToKnowMoreLine" - fi - - # Update your working copy first. - svn update $LOCATION --quiet - - # Add new files to your working copy. - for FILE in $(svn status $LOCATION | egrep '^\?' | cut -d ' ' -f7);do - svn add $FILE --quiet - done - -} diff --git a/Scripts/Bash/Functions/Help/help_checkLanguageLayout.sh b/Scripts/Bash/Functions/Help/help_checkLanguageLayout.sh index 41fa126..e75b9e4 100755 --- a/Scripts/Bash/Functions/Help/help_checkLanguageLayout.sh +++ b/Scripts/Bash/Functions/Help/help_checkLanguageLayout.sh @@ -35,7 +35,7 @@ function help_checkLanguageLayout { cli_printMessage "`gettext "Do you want to continue?"`" "AsYesOrNoRequestLine" help_createLanguageLayout - help_addNewFilesToWorkingCopy ${MANUALS_DIR[1]} + cli_commitRepoChanges fi diff --git a/Scripts/Bash/Functions/Help/help_updateOutputFiles.sh b/Scripts/Bash/Functions/Help/help_updateOutputFiles.sh index a23ac7c..59f11fd 100755 --- a/Scripts/Bash/Functions/Help/help_updateOutputFiles.sh +++ b/Scripts/Bash/Functions/Help/help_updateOutputFiles.sh @@ -98,15 +98,16 @@ function help_updateOutputFiles { # Update plaintext output directory. /usr/bin/makeinfo ${MANUALS_FILE[1]} --output=${MANUALS_FILE[5]} --plaintext --no-ifhtml - # Update central repository. Be sure to see changes before commit - # them up to central repository. - help_addNewFilesToWorkingCopy ${MANUALS_DIR[0]} - if [[ $(svn diff ${MANUALS_DIR[0]}) != '' ]];then - cli_printMessage "`gettext "The working copy has been updated."`" - cli_printMessage "`gettext "Do you want to see changes now?"`" "AsYesOrNoRequestLine" - eval svn diff ${MANUALS_DIR[0]} | less - cli_printMessage "`gettext "Do you want to commit changes now?"`" "AsYesOrNoRequestLine" - eval svn commit ${MANUALS_DIR[0]} - fi + # Re-define output variable in order for cli_commitRepoChanges + # functionality to receive the correct location to apply + # subversion commands. Inside `help' functionality, the correct + # place to commit changes is not the initial value of OPTIONVAL + # but the directory path where documentation changes take place + # under. + OPTIONVAL=${MANUALS_DIR[0]} + + # Update central repository. Be sure this is the last action + # you perform inside centos-art.sh script flow. + cli_commitRepoChanges }