# HG changeset patch # User Pascal Bellard # Date 1444474797 -7200 # Node ID 91cb129f0b7bb0f9e052c608c22a9509f7b1f828 # Parent 30afd82dffb7a112f3c42c0a471a8c932872d88a cooker: restore previous $command diff -r 30afd82dffb7 -r 91cb129f0b7b cooker --- a/cooker Sat Oct 10 12:40:48 2015 +0200 +++ b/cooker Sat Oct 10 12:59:57 2015 +0200 @@ -58,6 +58,8 @@ clean_exit() { rm -f $command; touch $command + ps | grep -q "${previous_command/:/ }" && + echo "$previous_command" > $command rm -f $pidfile } @@ -248,6 +250,7 @@ # Commands # +previous_command="$(cat $command)" case "$1" in usage|help|-u|-h) usage ;;