aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--trunk/lib/common.sh18
-rwxr-xr-xtrunk/src/jail-update1
2 files changed, 15 insertions, 4 deletions
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