]> gitweb.fluxo.info Git - simplepkg.git/commitdiff
added function update_template_files
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Thu, 5 Apr 2007 17:58:14 +0000 (17:58 +0000)
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Thu, 5 Apr 2007 17:58:14 +0000 (17:58 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@252 04377dda-e619-0410-9926-eae83683ac58

trunk/lib/common.sh
trunk/src/jail-update

index 6ba9335d0597d1afeeaa6e3132cd5e7fa2225a91..d47f687b186c2bf05efdd084bfcc7fe8cbfecb7b 100644 (file)
@@ -454,6 +454,19 @@ function svn_check {
 
 }
 
+function update_template_files {
+
+  # update template files from svn
+  # usage: update_template_files
+
+  if use_svn && [ -d "$TEMPLATE_BASE.d/.svn" ]; then
+    echo Checking out last template revision from svn...
+    cd `dirname $TEMPLATE_BASE`
+    svn update
+  fi
+
+}
+
 function copy_template_files {
 
   # copy template files into jail
@@ -461,13 +474,10 @@ function copy_template_files {
 
   if [ -d "$1" ]; then
     if [ -d "$TEMPLATE_BASE.d" ]; then 
+      echo "Copying template files to $1..."
       if use_svn && [ -d "$TEMPLATE_BASE.d/.svn" ]; then
-        echo Checking out last template revision from svn...
-        svn update
-        echo "Copying template files to $1..."
         rsync -av --exclude=.svn $TEMPLATE_BASE.d/ $1/
       else
-        echo "Copying template files to $1..."
         rsync -av $TEMPLATE_BASE.d/ $1/
       fi
     fi
index 4a557f3003a1ad09b447c913d5af19dbfa6fe4a7..1a6ea9b1ffd8507c51fec2773980475e2e5d4176 100755 (executable)
@@ -52,6 +52,7 @@ if [ "$?" != "0" ]; then
   exit 1
 fi
 
+update_template_files
 copy_template_files $1
 set_jail_perms $1