aboutsummaryrefslogtreecommitdiff
path: root/trunk/src/templatepkg
diff options
context:
space:
mode:
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2008-09-03 23:56:27 +0000
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2008-09-03 23:56:27 +0000
commit02c35be015c168aa9ad36cb328b29f23b38dd437 (patch)
tree273d47baeaffdae525b238935d1241822416fd33 /trunk/src/templatepkg
parentcb96b77a89846024572c1b7503c102fee573f458 (diff)
downloadsimplepkg-02c35be015c168aa9ad36cb328b29f23b38dd437.tar.gz
simplepkg-02c35be015c168aa9ad36cb328b29f23b38dd437.tar.bz2
merging with changes made since 21th May
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@514 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'trunk/src/templatepkg')
-rwxr-xr-xtrunk/src/templatepkg16
1 files changed, 12 insertions, 4 deletions
diff --git a/trunk/src/templatepkg b/trunk/src/templatepkg
index 4f2592f..a8045ee 100755
--- a/trunk/src/templatepkg
+++ b/trunk/src/templatepkg
@@ -479,10 +479,18 @@ function template_add {
if use_svn && [ -d "$TEMPLATE_BASE.d/.svn" ]; then
- if [ ! -d "$TEMPLATE_BASE.d/`dirname $file`/.svn" ]; then
- mkdir -p $TEMPLATE_BASE.d/`dirname $file`/
- svn add $TEMPLATE_BASE.d/`dirname $file`/
- fi
+ candidate="./`dirname $file`"
+ mkdir -p $TEMPLATE_BASE.d/$candidate
+ cd $TEMPLATE_BASE.d/$candidate
+ while true; do
+ if [ -d ".svn" ]; then
+ svn add `basename $candidate`
+ break
+ else
+ candidate="`basename $(pwd)`"
+ cd ..
+ fi
+ done
cp -a $jail/$file $destination