aboutsummaryrefslogtreecommitdiff
path: root/trunk/lib/common.sh
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/lib/common.sh')
-rw-r--r--trunk/lib/common.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/trunk/lib/common.sh b/trunk/lib/common.sh
index 8539abd..89e4e25 100644
--- a/trunk/lib/common.sh
+++ b/trunk/lib/common.sh
@@ -669,9 +669,9 @@ function svn_del {
function svn_copy {
+ # svn add file
# usage: svn_copy <orig> <dest>
- # svn add file
[ $# -ne 2 ] && handle_error $ERROR_PAR_NUMBER
if [ -e "$1" ]; then
@@ -687,7 +687,11 @@ function svn_copy {
fi
# copy file
- cp $orig/$file $dest
+ if [ "$(cd $(dirname $orig) ; pwd)" != "$(cd $(dirname $dest) ; pwd)" ]; then
+ cp $orig/$file $dest
+ fi
+
+ # add file to the revision system
if [ -d "`dirname $dest`/.svn" ]; then
chown_svn $dest && chgrp_svn $dest
( cd `dirname $dest` && svn_add `basename $dest` )