|
|
4debce |
#!/bin/bash
|
|
|
4debce |
#
|
|
|
4debce |
# svn.sh -- This function standardizes subversion tasks inside the
|
|
|
4debce |
# repository.
|
|
|
4debce |
#
|
|
|
4debce |
# Copyright (C) 2009, 2010, 2011, 2012 The CentOS Project
|
|
|
4debce |
#
|
|
|
4debce |
# This program is free software; you can redistribute it and/or modify
|
|
|
4debce |
# it under the terms of the GNU General Public License as published by
|
|
|
4debce |
# the Free Software Foundation; either version 2 of the License, or (at
|
|
|
4debce |
# your option) any later version.
|
|
|
4debce |
#
|
|
|
4debce |
# This program is distributed in the hope that it will be useful, but
|
|
|
4debce |
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
4debce |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
4debce |
# General Public License for more details.
|
|
|
4debce |
#
|
|
|
4debce |
# You should have received a copy of the GNU General Public License
|
|
|
4debce |
# along with this program; if not, write to the Free Software
|
|
|
4debce |
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
4debce |
#
|
|
|
4debce |
# ----------------------------------------------------------------------
|
|
|
4debce |
# $Id$
|
|
|
4debce |
# ----------------------------------------------------------------------
|
|
|
4debce |
|
|
|
4debce |
function svn {
|
|
|
4debce |
|
|
|
384602 |
local ACTIONNAM=''
|
|
|
384602 |
local ACTIONNAMS=''
|
|
|
384602 |
local ACTIONVAL=''
|
|
|
384602 |
|
|
|
384602 |
# Define absolute path to Subversion command.
|
|
|
384602 |
SVN=/usr/bin/svn
|
|
|
384602 |
|
|
|
d2147c |
# Interpret arguments and options passed through command-line.
|
|
|
d2147c |
svn_getOptions
|
|
|
d2147c |
|
|
|
384602 |
# Redefine positional parameters using ARGUMENTS. At this point,
|
|
|
384602 |
# option arguments have been removed from ARGUMENTS variable and
|
|
|
384602 |
# only non-option arguments remain in it.
|
|
|
384602 |
eval set -- "$ARGUMENTS"
|
|
|
384602 |
|
|
|
384602 |
# Define action value. We use non-option arguments to define the
|
|
|
384602 |
# action value (ACTIONVAL) variable.
|
|
|
384602 |
for ACTIONVAL in "$@";do
|
|
|
384602 |
|
|
|
e94c00 |
# Sanitate non-option arguments to be sure they match the
|
|
|
e94c00 |
# directory convenctions stablished by centos-art.sh script
|
|
|
e94c00 |
# against source directory locations in the working copy.
|
|
|
e94c00 |
cli_checkRepoDirSource
|
|
|
384602 |
|
|
|
384602 |
# Execute action names.
|
|
|
384602 |
for ACTIONNAM in $ACTIONNAMS;do
|
|
|
384602 |
$ACTIONNAM
|
|
|
384602 |
done
|
|
|
384602 |
|
|
|
384602 |
done
|
|
|
4debce |
|
|
|
4debce |
}
|