From 139ff2421526eb761d3b2b637403f19aa8f4e222 Mon Sep 17 00:00:00 2001 From: rhatto Date: Thu, 11 Dec 2008 16:14:14 +0000 Subject: fix on svn_copy git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@647 04377dda-e619-0410-9926-eae83683ac58 --- trunk/lib/common.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'trunk/lib/common.sh') 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 - # 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` ) -- cgit v1.2.3