From 02c35be015c168aa9ad36cb328b29f23b38dd437 Mon Sep 17 00:00:00 2001 From: rhatto Date: Wed, 3 Sep 2008 23:56:27 +0000 Subject: merging with changes made since 21th May git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@514 04377dda-e619-0410-9926-eae83683ac58 --- trunk/src/templatepkg | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'trunk/src/templatepkg') 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 -- cgit v1.2.3