aboutsummaryrefslogtreecommitdiff
path: root/trunk/lib
diff options
context:
space:
mode:
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2008-12-11 16:14:14 +0000
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2008-12-11 16:14:14 +0000
commit139ff2421526eb761d3b2b637403f19aa8f4e222 (patch)
treeb5ff930eb81cd0d36abce99c8acce9ba6c7cdfbf /trunk/lib
parentacc74c5160626d761d6727aa4b04790f6a01f92e (diff)
downloadsimplepkg-139ff2421526eb761d3b2b637403f19aa8f4e222.tar.gz
simplepkg-139ff2421526eb761d3b2b637403f19aa8f4e222.tar.bz2
fix on svn_copy
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@647 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'trunk/lib')
-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` )