diff options
-rwxr-xr-x | trunk/src/jail-commit | 9 |
1 files changed, 6 insertions, 3 deletions
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 } |