Changed a hack by proper code.

This commit is contained in:
Manuel Canales Esparcia 2006-05-04 18:26:42 +00:00
parent 7a519f3c5f
commit 4edf3b7ded
2 changed files with 5 additions and 4 deletions

View file

@ -198,19 +198,21 @@ HEADER="# This file is automatically generated by jhalfs
#----------------------------------# #----------------------------------#
wrt_target() { # Create target and initialize log file wrt_target() { # Create target and initialize log file
#----------------------------------# #----------------------------------#
local i=$1 local i=$1
local PREV=$2 local PREV=$2
case $i in
iteration* ) local LOGFILE=$this_script.log ;;
* ) local LOGFILE=$this_script ;;
esac
( (
cat << EOF cat << EOF
$i: $PREV $i: $PREV
@\$(call echo_message, Building) @\$(call echo_message, Building)
@echo -e "\n\`date\`\n\nKB: \`du -skx --exclude=jhalfs \$(MOUNT_PT)\`\n" >logs/$this_script @echo -e "\n\`date\`\n\nKB: \`du -skx --exclude=jhalfs \$(MOUNT_PT)\`\n" >logs/$LOGFILE
EOF EOF
) >> $MKFILE.tmp ) >> $MKFILE.tmp
} }

View file

@ -108,7 +108,6 @@ wrt_logs() { #
( (
cat << EOF cat << EOF
@pushd logs 1> /dev/null && \\ @pushd logs 1> /dev/null && \\
rm $ITERATION && \\
mkdir $ITERATION && \\ mkdir $ITERATION && \\
mv ${LOGS} $ITERATION && \\ mv ${LOGS} $ITERATION && \\
popd 1> /dev/null popd 1> /dev/null