diff options
author | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2008-09-03 23:56:27 +0000 |
---|---|---|
committer | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2008-09-03 23:56:27 +0000 |
commit | 02c35be015c168aa9ad36cb328b29f23b38dd437 (patch) | |
tree | 273d47baeaffdae525b238935d1241822416fd33 /trunk/src/templatepkg | |
parent | cb96b77a89846024572c1b7503c102fee573f458 (diff) | |
download | simplepkg-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-x | trunk/src/templatepkg | 16 |
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 |