aboutsummaryrefslogtreecommitdiff
path: root/trunk/src/templatepkg
diff options
context:
space:
mode:
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