diff options
author | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2007-04-05 17:58:14 +0000 |
---|---|---|
committer | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2007-04-05 17:58:14 +0000 |
commit | 11fdeae3e9f77d855d9eb4e591aaeb890c0f4bc4 (patch) | |
tree | 1252914360f07575fcc4cd3705228886efa98db7 /trunk | |
parent | edf7e3cbcd6a8d339f8bb0a432d5455df6c8602b (diff) | |
download | simplepkg-11fdeae3e9f77d855d9eb4e591aaeb890c0f4bc4.tar.gz simplepkg-11fdeae3e9f77d855d9eb4e591aaeb890c0f4bc4.tar.bz2 |
added function update_template_files
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@252 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'trunk')
-rw-r--r-- | trunk/lib/common.sh | 18 | ||||
-rwxr-xr-x | trunk/src/jail-update | 1 |
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 |