diff options
author | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2008-11-28 17:48:16 +0000 |
---|---|---|
committer | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2008-11-28 17:48:16 +0000 |
commit | 4efaebc4ed4d02b358e134e9251780858f135a4a (patch) | |
tree | d409fd81cc495bd42bc1cd9e39e35d8c828cd032 /trunk/lib | |
parent | b34b0bf5b2f520b35dc6527c5d4ef2b5e18f9cb7 (diff) | |
download | simplepkg-4efaebc4ed4d02b358e134e9251780858f135a4a.tar.gz simplepkg-4efaebc4ed4d02b358e134e9251780858f135a4a.tar.bz2 |
fix
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@605 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'trunk/lib')
-rw-r--r-- | trunk/lib/common.sh | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/trunk/lib/common.sh b/trunk/lib/common.sh index a49257a..cbe6680 100644 --- a/trunk/lib/common.sh +++ b/trunk/lib/common.sh @@ -599,19 +599,23 @@ function svn_copy { # svn add file [ $# -ne 2 ] && handle_error $ERROR_PAR_NUMBER - orig="`dirname $1`" - file="`basename $1`" - dest="$2" + if [ -e "$1" ]; then - if [ -d "$dest" ]; then - dest="$dest/$file" - fi + orig="`dirname $1`" + file="`basename $1`" + dest="$2" + + if [ -d "$dest" ]; then + dest="$dest/$file" + fi + + # copy file + cp $orig/$file $dest + if [ -d "`dirname $dest`/.svn" ]; then + chown_svn $dest && chgrp_svn $dest + ( cd `dirname $dest` && svn_add `basename $dest` ) + fi - # copy file - cp $orig/$file $dest - if [ -d "`dirname $dest`/.svn" ]; then - chown_svn $dest && chgrp_svn $dest - ( cd `dirname $dest` && svn_add `basename $dest` ) fi } |