# HG changeset patch # User Pascal Bellard # Date 1442997457 -7200 # Node ID 050f39040fe4d793e3d24d52f4cbb43c5424bb42 # Parent aea93b5ceac88a8c35a1c04c90766cd7fa05720f cook: add cook time in debug_info (again) diff -r aea93b5ceac8 -r 050f39040fe4 cook --- a/cook Wed Sep 23 10:21:48 2015 +0200 +++ b/cook Wed Sep 23 10:37:37 2015 +0200 @@ -389,7 +389,6 @@ # Display debugging error info. debug_info() { - time=$(($(date +%s) - $time)) newline; _ 'Debug information'; separator # L10n: specify your format of date and time (to help: man date) # L10n: not bad one is '+%x %R' @@ -405,7 +404,7 @@ fgrep "$error" $LOGS/$pkg.log done > $LOGS/$pkg.log.debug_info 2>&1 cat $LOGS/$pkg.log.debug_info - _ 'Cook time : %ds' "$time" + [ "$time" ] && _ 'Cook time : %ds' "$(($(date +%s) - $time))" rm -f $LOGS/$pkg.log.debug_info separator; newline }