# HG changeset patch # User Pascal Bellard # Date 1359532147 -3600 # Node ID 0e4ec874b3bd08568c2177648716f97902402343 # Parent 82cddb19751c24098d9725221071a59e46e8cdfd limit log size, not stdout diff -r 82cddb19751c -r 0e4ec874b3bd cook --- a/cook Tue Jan 29 23:02:16 2013 +0100 +++ b/cook Wed Jan 30 08:49:07 2013 +0100 @@ -891,6 +891,12 @@ EOT } +# Truncate stdout log file to $1 Mb. +loglimit() +{ + tee /dev/stderr | dd bs=1024k count=${1:-50} 2> /dev/null +} + # # Commands # @@ -1343,10 +1349,10 @@ done # Cook and pack or exit on error and log everything. - cookit $@ 2>&1 | dd bs=1024k count=50 | tee $LOGS/$pkg.log + cookit $@ 2>&1 | loglimit 50 > $LOGS/$pkg.log remove_deps | tee -a $LOGS/$pkg.log cookit_quality - packit 2>&1 | dd bs=1024k count=5 |tee -a $LOGS/$pkg.log + packit 2>&1 | loglimit 5 >> $LOGS/$pkg.log clean_log # Exit if any error in packing.