cookutils rev 757
cook: add cook time in debug_info (again)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Sep 23 13:31:37 2015 +0200 (2015-09-23) |
parents | 050f39040fe4 |
children | ff75493f98ba |
files | cook |
line diff
1.1 --- a/cook Wed Sep 23 10:37:37 2015 +0200 1.2 +++ b/cook Wed Sep 23 13:31:37 2015 +0200 1.3 @@ -393,6 +393,7 @@ 1.4 # L10n: specify your format of date and time (to help: man date) 1.5 # L10n: not bad one is '+%x %R' 1.6 _ 'Cook date: %s' "$(date "$(_ '+%%F %%R')")" 1.7 + [ "$time" ] && _ 'Cook time: %ds' "$(($(date +%s) - $time))" 1.8 # L10n: Please, translate all messages beginning with ERROR in a same way 1.9 lerror=$(_n 'ERROR') 1.10 for error in \ 1.11 @@ -404,7 +405,6 @@ 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 - [ "$time" ] && _ 'Cook time : %ds' "$(($(date +%s) - $time))" 1.16 rm -f $LOGS/$pkg.log.debug_info 1.17 separator; newline 1.18 }