diff options
author | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2008-12-11 16:14:14 +0000 |
---|---|---|
committer | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2008-12-11 16:14:14 +0000 |
commit | 139ff2421526eb761d3b2b637403f19aa8f4e222 (patch) | |
tree | b5ff930eb81cd0d36abce99c8acce9ba6c7cdfbf | |
parent | acc74c5160626d761d6727aa4b04790f6a01f92e (diff) | |
download | simplepkg-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
-rw-r--r-- | trunk/lib/common.sh | 8 |
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` ) |