|
|
f20852 |
#!/bin/bash
|
|
|
f20852 |
#
|
|
|
f20852 |
# copy.sh -- This function copies files inside the repository and
|
|
|
f20852 |
# updates menu, nodes and cross references inside repository
|
|
|
f20852 |
# documentation manual for each file copied.
|
|
|
f20852 |
#
|
|
|
f20852 |
|
|
|
f20852 |
|
|
|
f20852 |
|
|
|
f20852 |
#
|
|
|
f20852 |
|
|
|
f20852 |
# location can be anything accepted by subversion copy command.
|
|
|
f20852 |
|
|
|
f20852 |
|
|
|
f20852 |
# empty, then it is copied to target. However, when there is one or
|
|
|
f20852 |
|
|
|
f20852 |
|
|
|
f20852 |
# file by file to target location creating parents directories for
|
|
|
f20852 |
# target files when it be needed.
|
|
|
f20852 |
#
|
|
|
2d3646 |
# Copyright (C) 2009, 2010, 2011 The CentOS Project
|
|
|
f20852 |
#
|
|
|
f20852 |
# This program is free software; you can redistribute it and/or modify
|
|
|
f20852 |
|
|
|
dcd347 |
|
|
|
dcd347 |
|
|
|
f20852 |
#
|
|
|
74a058 |
|
|
|
74a058 |
|
|
|
f20852 |
|
|
|
f20852 |
# General Public License for more details.
|
|
|
f20852 |
#
|
|
|
f20852 |
|
|
|
f20852 |
# along with this program; if not, write to the Free Software
|
|
|
dcd347 |
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
7ac5a5 |
#
|
|
|
f20852 |
# ----------------------------------------------------------------------
|
|
|
f20852 |
# $Id$
|
|
|
f20852 |
# ----------------------------------------------------------------------
|
|
|
f20852 |
|
|
|
f20852 |
function copy {
|
|
|
f20852 |
|
|
|
f20852 |
local ACTIONNAM=''
|
|
|
f20852 |
local ACTIONVAL=''
|
|
|
f20852 |
local -a ACTIONVALS
|
|
|
f20852 |
local -a SRC
|
|
|
f20852 |
local DST=''
|
|
|
f20852 |
local COUNT=0
|
|
|
f20852 |
|
|
|
f20852 |
# Interpret arguments and options passed through command-line.
|
|
|
c2b86b |
copy_getOptions
|
|
|
f20852 |
|
|
|
f20852 |
# Redefine positional parameters using ARGUMENTS. At this point,
|
|
|
f20852 |
|
|
|
f20852 |
|
|
|
f20852 |
eval set -- "$ARGUMENTS"
|
|
|
f20852 |
|
|
|
f20852 |
|
|
|
f20852 |
|
|
|
f20852 |
|
|
|
f20852 |
|
|
|
f20852 |
for ACTIONVAL in "$@";do
|
|
|
f20852 |
ACTIONVALS[((++${#ACTIONVALS[*]}))]="$ACTIONVAL"
|
|
|
f20852 |
done
|
|
|
f20852 |
|
|
|
f20852 |
# Define list of source locations using remaining arguments.
|
|
|
f20852 |
while [[ ${COUNT} -lt $((${#ACTIONVALS[*]} - 1)) ]];do
|
|
|
f20852 |
SRC[((++${#SRC[*]}))]=${ACTIONVALS[$COUNT]}
|
|
|
f20852 |
COUNT=$(($COUNT + 1))
|
|
|
f20852 |
done
|
|
|
f20852 |
|
|
|
f20852 |
|
|
|
f20852 |
DST=$(cli_checkRepoDirTarget "${ACTIONVALS[((${#ACTIONVALS[*]} - 1))]}")
|
|
|
f20852 |
|
|
|
f20852 |
|
|
|
f20852 |
for ACTIONVAL in "${SRC[@]}";do
|
|
|
f20852 |
|
|
|
f20852 |
|
|
|
f20852 |
|
|
|
f20852 |
|
|
|
f20852 |
cli_checkRepoDirSource
|
|
|
f20852 |
|
|
|
f20852 |
|
|
|
f20852 |
|
|
|
f20852 |
|
|
|
f20852 |
|
|
|
f20852 |
cli_syncroRepoChanges "$ACTIONVAL $DST"
|
|
|
f20852 |
|
|
|
f20852 |
|
|
|
f20852 |
echo "svn copy $ACTIONVAL $DST"
|
|
|
f20852 |
|
|
|
f20852 |
|
|
|
f20852 |
|
|
|
f20852 |
|
|
|
f20852 |
|
|
|
f20852 |
cli_commitRepoChanges "$ACTIONVAL $DST"
|
|
|
f20852 |
|
|
|
f20852 |
|
|
|
f20852 |
centos-art help "$ACTIONVAL" "$DST" --copy
|
|
|
f20852 |
|
|
|
f20852 |
done
|
|
|
f20852 |
|
|
|
f20852 |
}
|