cookutils rev 723 slitaz-tank
cook: Fixed loglimit function.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Fri Apr 17 21:02:34 2015 +0000 (2015-04-17) |
parents | 5cb10078fbc0 |
children | 7618375fefaa |
files | cook |
line diff
1.1 --- a/cook Fri Apr 17 21:01:26 2015 +0000 1.2 +++ b/cook Fri Apr 17 21:02:34 2015 +0000 1.3 @@ -1150,7 +1150,7 @@ 1.4 # Truncate stdout log file to $1 Mb. 1.5 loglimit() 1.6 { 1.7 - if [ "$DEFAULT_LOG_LIMIT" ]; then 1.8 + if [ -n "$DEFAULT_LOG_LIMIT" ]; then 1.9 tee /dev/stderr | dd bs=1024k count=${1:-$DEFAULT_LOG_LIMIT} 2> /dev/null 1.10 else 1.11 tee /dev/stderr