diff options
author | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2008-12-04 00:50:47 +0000 |
---|---|---|
committer | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2008-12-04 00:50:47 +0000 |
commit | fcfc2248b2cf6a611836d0635a875fb10f93d74a (patch) | |
tree | 5d1fc31ccfd1e7b0b367b5ae54c8336ac988007d /trunk/src/jail-commit | |
parent | f9f16bb55714940883484f63b6daad9c279dd3ce (diff) | |
download | simplepkg-fcfc2248b2cf6a611836d0635a875fb10f93d74a.tar.gz simplepkg-fcfc2248b2cf6a611836d0635a875fb10f93d74a.tar.bz2 |
new 'compact' template format
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@634 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'trunk/src/jail-commit')
-rwxr-xr-x | trunk/src/jail-commit | 22 |
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 |