cookutils rev 756
cook: add cook time in debug_info (again)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Sep 23 10:37:37 2015 +0200 (2015-09-23) |
parents | aea93b5ceac8 |
children | 3c3335a506af |
files | cook |
line diff
1.1 --- a/cook Wed Sep 23 10:21:48 2015 +0200 1.2 +++ b/cook Wed Sep 23 10:37:37 2015 +0200 1.3 @@ -389,7 +389,6 @@ 1.4 # Display debugging error info. 1.5 1.6 debug_info() { 1.7 - time=$(($(date +%s) - $time)) 1.8 newline; _ 'Debug information'; separator 1.9 # L10n: specify your format of date and time (to help: man date) 1.10 # L10n: not bad one is '+%x %R' 1.11 @@ -405,7 +404,7 @@ 1.12 fgrep "$error" $LOGS/$pkg.log 1.13 done > $LOGS/$pkg.log.debug_info 2>&1 1.14 cat $LOGS/$pkg.log.debug_info 1.15 - _ 'Cook time : %ds' "$time" 1.16 + [ "$time" ] && _ 'Cook time : %ds' "$(($(date +%s) - $time))" 1.17 rm -f $LOGS/$pkg.log.debug_info 1.18 separator; newline 1.19 }