]> gitweb.fluxo.info Git - simplepkg.git/commitdiff
templatepkg: small fixes
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Thu, 5 Apr 2007 21:06:24 +0000 (21:06 +0000)
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Thu, 5 Apr 2007 21:06:24 +0000 (21:06 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@260 04377dda-e619-0410-9926-eae83683ac58

trunk/src/templatepkg

index e337849776bc2e0f4fec8c9c13bc536733219e87..3b77b97da84d999cbb3a53dd6ee5dd866a471111 100755 (executable)
@@ -170,12 +170,16 @@ function template_create {
   local template_base info_commit orig_template
 
   if [ ! -d "`dirname $TEMPLATE_BASE`" ]; then
+
+    echo Creating template `basename $TEMPLATE_BASE`...
+
     if use_svn && [ -d "`dirname $TEMPLATE_BASE`/.svn" ]; then
       cd `dirname $TEMPLATE_BASE`
       svn mkdir `dirname $TEMPLATE_BASE`
     else
       mkdir -p `dirname $TEMPLATE_BASE`
     fi
+
   else
     echo $BASENAME: template `basename $TEMPLATE_BASE` already exists
     exit 1
@@ -208,6 +212,10 @@ function template_create {
       info_commit="yes"
     fi
 
+  elif use_svn && [ -d "$BASE_CONF/templates/.svn" ]; then
+    cd $BASE_CONF/templates
+    svn add `basename $TEMPLATE_BASE`
+    info_commit="yes"
   else
     mkdir $TEMPLATE_BASE.{d,s}
   fi
@@ -231,8 +239,8 @@ function template_create {
       
     if use_svn && [ -d "$orig_template/.svn" ]; then
       rsync -av --exclude=.svn $orig_template/$ROOT.d/ $TEMPLATE_BASE.d/
-      cd `dirname $TEMPLATE_BASE`
-      svn add $TEMPLATE_BASE.d/*
+      cd $BASE_CONF/templates
+      svn add `basename $TEMPLATE_BASE`
       info_commit="yes"
     else
       rsync -av $orig_template/$ROOT.d/ $TEMPLATE_BASE.d/