]> gitweb.fluxo.info Git - simplepkg.git/commitdiff
templatepkg: small fixes
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Wed, 4 Apr 2007 13:42:32 +0000 (13:42 +0000)
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Wed, 4 Apr 2007 13:42:32 +0000 (13:42 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@221 04377dda-e619-0410-9926-eae83683ac58

trunk/src/templatepkg

index a8902217856fcb8bb8101a0f4a0a951c6be3b48d..505708b590151760342ab91f78376c5ea4d42b70 100755 (executable)
@@ -35,7 +35,7 @@ function usage {
   echo ""
   echo "  -c | --create: create a template from a jail; arguments are:"
   echo ""
-  echo "      $BASENAME -u <template> [jail-root]"
+  echo "      $BASENAME -c <template> [jail-root]"
   echo ""
   echo "  -u | --update: update a template from a jail; arguments are:"
   echo ""
@@ -168,30 +168,30 @@ function template_create {
     fi
   fi
 
-  touch $TEMPLATE.perms
-  touch $TEMPLATE.template
+  touch $TEMPLATE_BASE.perms
+  touch $TEMPLATE_BASE.template
 
   if use_svn && [ -d "$TEMPLATE_BASE/.svn" ]; then
 
     cd $TEMPLATE_BASE
 
-    if ! svn_check $TEMPLATE.d; then
-      svn mkdir $TEMPLATE.d
+    if ! svn_check $TEMPLATE_BASE.d; then
+      svn mkdir $TEMPLATE_BASE.d
       info_commit="yes"
     fi
 
-    if ! svn_check $TEMPLATE.s; then
+    if ! svn_check $TEMPLATE_BASE.s; then
       svn mkdir $TEMPLATE.s
       info_commit="yes"
     fi
 
-    if ! svn_check $TEMPLATE.template; then
-      svn add $TEMPLATE.template
+    if ! svn_check $TEMPLATE_BASE.template; then
+      svn add $TEMPLATE_BASE.template
       info_commit="yes"
     fi
 
-    if ! svn_check $TEMPLATE.perms; then
-      svn add $TEMPLATE.perms
+    if ! svn_check $TEMPLATE_BASE.perms; then
+      svn add $TEMPLATE_BASE.perms
       info_commit="yes"
     fi
 
@@ -200,7 +200,7 @@ function template_create {
     fi
 
   else
-    mkdir $TEMPLATE.{d,s}
+    mkdir $TEMPLATE_BASE.{d,s}
   fi
 
   template_update
@@ -390,7 +390,7 @@ elif [ "$1" == "-d" ] || [ "$1" == "--delete" ]; then
 
     if [ -a "$TEMPLATE_BASE.d/$3" ]; then
       if use_svn; then
-        cd $TEMPLATE_BASE
+        cd $TEMPLATE_BASE.d
         svn del --force ./$3 || rm -rf ./$3
         echo $BASENAME: please run jail-commit to del $3 in the svn repository
       else