cookutils diff cook @ rev 751
cooker.cgi: show cook progress
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Sep 20 13:00:39 2015 +0200 (2015-09-20) |
parents | ff09ce1a0b9b |
children | ebd654564cf3 |
line diff
1.1 --- a/cook Tue Aug 25 11:59:58 2015 +0200 1.2 +++ b/cook Sun Sep 20 13:00:39 2015 +0200 1.3 @@ -1676,6 +1676,8 @@ 1.4 time=$(date +%s) 1.5 pkg="$1" 1.6 [ -z "$pkg" ] && usage 1.7 + lastcooktime=$(sed '/^Cook time/!d;s|.*: *\([0-9]*\)s.*|\1|' \ 1.8 + $LOGS/$pkg.log 2> /dev/null) 1.9 receipt="$WOK/$pkg/receipt" 1.10 check_pkg_in_wok 1.11 newline 1.12 @@ -1724,6 +1726,8 @@ 1.13 # Log and source receipt. 1.14 _ 'Cook started for: %s' "<a href='cooker.cgi?pkg=$pkg'>$pkg</a>" | log 1.15 echo "cook:$pkg" > $command 1.16 + [ "$lastcooktime" ] && 1.17 + echo "cook:$pkg $lastcooktime $(date +%s)" > $cooktime 1.18 1.19 # Display and log info if cook process stopped. 1.20 # FIXME: gettext not working (in single quotes) here!