]> gitweb.fluxo.info Git - simplepkg.git/commitdiff
jail-commit: minor fixes
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Wed, 4 Apr 2007 20:21:00 +0000 (20:21 +0000)
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Wed, 4 Apr 2007 20:21:00 +0000 (20:21 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@236 04377dda-e619-0410-9926-eae83683ac58

trunk/src/jail-commit

index 76e326be180255e398aa77f1f1f1b631674adff9..d338e750a3eda2e92fae492c98619e84a598b148 100755 (executable)
@@ -69,9 +69,15 @@ function template_merge {
 
 function template_svn_commit {
 
-  if use_svn; then
-    cd `dirname $TEMPLATE_BASE`
+  # issue a svn_commit from a template folder
+  # usage: template_svn_commit <template-folder>
+
+  if use_svn && [ -d "$1/.svn" ]; then
+    cd $1
     svn commit -m "changes for `date`"
+    if [ "$?" != "0" ]; then
+      echo $BASENAME: commit error
+    fi
   fi
 
 }
@@ -95,14 +101,14 @@ function do_commit {
   search_template $template --update
   if [ "$?" == "0" ]; then
     if [ "$jailpath" == "/" ]; then
-      echo updating main installation...
+      echo Updating main installation...
     else
-      echo updating $jailpath...
+      echo Updating $jailpath...
     fi
     if [ -d "$TEMPLATE_BASE.d" ] || [ -a "$TEMPLATE_BASE.template" ]; then
       templatepkg -u $template $jailpath
       template_merge $jailpath
-      template_svn_commit $TEMPLATE_BASE
+      template_svn_commit `dirname $TEMPLATE_BASE`
     fi
   fi