cookutils rev 722 slitaz-tank
cook: Update loglimit function.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Fri Apr 17 21:01:26 2015 +0000 (2015-04-17) |
parents | e5bb1ba792f8 |
children | 38cd201187fa |
files | cook |
line diff
1.1 --- a/cook Tue Apr 14 05:33:13 2015 +0000 1.2 +++ b/cook Fri Apr 17 21:01:26 2015 +0000 1.3 @@ -1150,8 +1150,11 @@ 1.4 # Truncate stdout log file to $1 Mb. 1.5 loglimit() 1.6 { 1.7 - [ -n "$DEFAULT_LOG_LIMIT" ] || return 1.8 - tee /dev/stderr | dd bs=1024k count=${1:-$DEFAULT_LOG_LIMIT} 2> /dev/null 1.9 + if [ "$DEFAULT_LOG_LIMIT" ]; then 1.10 + tee /dev/stderr | dd bs=1024k count=${1:-$DEFAULT_LOG_LIMIT} 2> /dev/null 1.11 + else 1.12 + tee /dev/stderr 1.13 + fi 1.14 } 1.15 1.16 #