From 11fdeae3e9f77d855d9eb4e591aaeb890c0f4bc4 Mon Sep 17 00:00:00 2001 From: rhatto Date: Thu, 5 Apr 2007 17:58:14 +0000 Subject: added function update_template_files git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@252 04377dda-e619-0410-9926-eae83683ac58 --- trunk/lib/common.sh | 18 ++++++++++++++---- trunk/src/jail-update | 1 + 2 files changed, 15 insertions(+), 4 deletions(-) (limited to 'trunk') diff --git a/trunk/lib/common.sh b/trunk/lib/common.sh index 6ba9335..d47f687 100644 --- a/trunk/lib/common.sh +++ b/trunk/lib/common.sh @@ -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 diff --git a/trunk/src/jail-update b/trunk/src/jail-update index 4a557f3..1a6ea9b 100755 --- a/trunk/src/jail-update +++ b/trunk/src/jail-update @@ -52,6 +52,7 @@ if [ "$?" != "0" ]; then exit 1 fi +update_template_files copy_template_files $1 set_jail_perms $1 -- cgit v1.2.3