From 1d1e5b0b53c139702301731e61660e26ba604a3b Mon Sep 17 00:00:00 2001 From: rhatto Date: Thu, 5 Apr 2007 15:36:43 +0000 Subject: jail-update: small change git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@242 04377dda-e619-0410-9926-eae83683ac58 --- trunk/src/jail-commit | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'trunk') diff --git a/trunk/src/jail-commit b/trunk/src/jail-commit index c2d66b5..1142cb8 100755 --- a/trunk/src/jail-commit +++ b/trunk/src/jail-commit @@ -45,7 +45,7 @@ function template_merge { return 1 fi - echo "" > $TEMPLATE_BASE.perms + echo "" > $TEMPLATE_BASE.perms.tmp cd $TEMPLATE_BASE.d for file in `find | grep -v -e "/.svn$" | grep -v -e "/.svn/" | grep -v -e "^\.$"`; do @@ -67,14 +67,17 @@ function template_merge { perms="`numeric_perm $1/$file`" owner="`get_owner $1/$file`" group="`get_group $1/$file`" - echo "$file;$owner;$group;$perms" >> $TEMPLATE_BASE.perms + echo "$file;$owner;$group;$perms" >> $TEMPLATE_BASE.perms.tmp else if [ ! -e "$1/$file" ]; then - echo $BASENAME: warning: missing file $1/$file + echo $BASENAME: warning: missing file $1/$file fi fi + cat $TEMPLATE_BASE.perms.tmp | sed '/^$/d' > $TEMPLATE_BASE.perms + rm -f $TEMPLATE_BASE.perms.tmp + done } -- cgit v1.2.3