aboutsummaryrefslogtreecommitdiff
path: root/trunk/src/jail-commit
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/src/jail-commit')
-rwxr-xr-xtrunk/src/jail-commit22
1 files changed, 11 insertions, 11 deletions
diff --git a/trunk/src/jail-commit b/trunk/src/jail-commit
index 278d766..d91a767 100755
--- a/trunk/src/jail-commit
+++ b/trunk/src/jail-commit
@@ -43,12 +43,12 @@ function template_merge {
# usage: template_merge <jail-path>
- if [ -z "$1" ] || [ ! -d "$TEMPLATE_BASE.d" ]; then
+ if [ -z "$1" ] || [ ! -d "`template_files`" ]; then
return 1
fi
- echo "" > $TEMPLATE_BASE.perms.tmp
- cd $TEMPLATE_BASE.d
+ echo "" > `template_perms`.tmp
+ cd `template_files`
for file in `find | grep -v -e "/.svn$" | grep -v -e "/.svn/" | grep -v -e "^\.$"`; do
@@ -71,10 +71,10 @@ function template_merge {
group="`get_group $1/$file`"
# secure the file
- chown root.root $TEMPLATE_BASE.d/$file
- chmod $perms $TEMPLATE_BASE.d/$file
+ chown root.root `template_files`/$file
+ chmod $perms `template_files`/$file
- echo "$file;$owner;$group;$perms" >> $TEMPLATE_BASE.perms.tmp
+ echo "$file;$owner;$group;$perms" >> `template_perms`.tmp
else
if [ ! -e "$1/$file" ]; then
@@ -84,11 +84,11 @@ function template_merge {
done
- cat $TEMPLATE_BASE.perms.tmp | sed '/^$/d' > $TEMPLATE_BASE.perms
- rm -f $TEMPLATE_BASE.perms.tmp
+ cat `template_perms`.tmp | sed '/^$/d' > `template_perms`
+ rm -f `template_perms`.tmp
- if templates_under_svn && ! svn_check $TEMPLATE_BASE.perms; then
- svn add $TEMPLATE_BASE.perms
+ if templates_under_svn && ! svn_check `template_perms`; then
+ svn add `template_perms`
fi
}
@@ -135,7 +135,7 @@ function do_commit {
else
echo Updating $jailpath...
fi
- if [ -d "$TEMPLATE_BASE.d" ] || [ -a "$TEMPLATE_BASE.template" ]; then
+ if [ -d "`template_files`" ] || [ -a "`template_packages`" ]; then
SILENT=yes templatepkg -u $template $jailpath
template_merge $jailpath
fi