cookutils rev 755

cook: add cook time in debug_info
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Sep 23 10:21:48 2015 +0200 (2015-09-23)
parents fcc595470268
children 050f39040fe4
files cook
line diff
     1.1 --- a/cook	Wed Sep 23 09:40:32 2015 +0200
     1.2 +++ b/cook	Wed Sep 23 10:21:48 2015 +0200
     1.3 @@ -389,6 +389,7 @@
     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 @@ -404,6 +405,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  	rm -f $LOGS/$pkg.log.debug_info
    1.17  	separator; newline
    1.18  }