Ryan Schmidt wrote:
> I usually don't comment on language usage issues on this list, but in
> the case of the name of a script you're releasing to others, you
> would do better to use the correct English plural of the word
> "child", which is "children" (not "childs").
You're right, svnMergeChildren it is.
Thanks.
---8<---------------------------------
#!/bin/bash
#--- svnMergeChildren.sh --------------------------------------------
# Copyright (C) 2006 Freddy Vulto
# Version: 2.0.0
#
# 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, 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., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA
#
# The latest version of this software can be obtained here:
# http://fvue.nl/svnMergeChildren/
set -o errexit # Exit on error
set -o nounset # Trigger error when expanding unset variables
function svnMergeChildren() {
# If no arguments, or -h, or --help, show usage
[[ $# == 0 || $1 == -h || $1 == --help ]] && {
echo -n Merge children: Apply the difference between
echo two sources to multiple working copy paths
echo Usage: $(basename $0) ... NAME_PARENT
echo
echo See \'svn help merge\' for ... arguments.
echo
echo For more information, see http://fvue.nl/svnMergeChildren/
return $(test $# -gt 0)
}
# Get last parameter
parent=${!#}
# Unset last positional parameter
args=( "$@" ); unset args[${#args[@]}-1]; set -- "${args[@]}"
# Indicate non-verbose if either -q or --quiet specified
for i; do [ "$i" = -q -o "$i" = --quiet ] && beVerbose=0; done
# Loop through children
shopt -s failglob nullglob; for i in "$parent"?*; do
(( "${beVerbose-1}" )) && echo svn merge "$@" "$i"
svn merge "$@" "$i"
done
} # svnMergeChildren()
svnMergeChildren "$@"
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sun Nov 12 23:26:28 2006