aboutsummaryrefslogtreecommitdiff
path: root/trunk/src/templatepkg
diff options
context:
space:
mode:
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2008-12-05 02:13:19 +0000
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2008-12-05 02:13:19 +0000
commit10d88faa8b4f08d4f9a572ad22a2065cc03410b9 (patch)
tree4d996a8beaf9fcd6db5a56cf0e0c02250498ff33 /trunk/src/templatepkg
parent4202d1af89d317f8521fd2d7abba9136aa8defb6 (diff)
downloadsimplepkg-10d88faa8b4f08d4f9a572ad22a2065cc03410b9.tar.gz
simplepkg-10d88faa8b4f08d4f9a572ad22a2065cc03410b9.tar.bz2
fix on template_add
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@640 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'trunk/src/templatepkg')
-rwxr-xr-xtrunk/src/templatepkg25
1 files changed, 14 insertions, 11 deletions
diff --git a/trunk/src/templatepkg b/trunk/src/templatepkg
index d079902..3f0284a 100755
--- a/trunk/src/templatepkg
+++ b/trunk/src/templatepkg
@@ -494,17 +494,20 @@ function template_add {
if templates_under_svn && [ -d "`template_files`/.svn" ]; then
candidate="./`dirname $file`"
- mkdir -p `template_files`/$candidate
- cd `template_files`/$candidate
- while true; do
- if [ -d ".svn" ]; then
- svn add `basename $candidate`
- break
- else
- candidate="`basename $(pwd)`"
- cd ..
- fi
- done
+
+ if [ ! -d "`template_files`/$candidate/.svn" ]; then
+ mkdir -p `template_files`/$candidate
+ cd `template_files`/`dirname $candidate`
+ while true; do
+ if [ -d ".svn" ]; then
+ svn add `basename $candidate`
+ break
+ else
+ candidate="`basename $(pwd)`"
+ cd ..
+ fi
+ done
+ fi
cp -a $jail/$file $destination