takagi / lake

Lake is a GNU make like build utility in Common Lisp.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Continuously output transmit output of the shell command, started by (sh ...)

svetlyak40wt opened this issue · comments

Right now, output is shown only after a command has finished.

To test, you can make a test.sh with the content:

#!/bin/bash

for i in `seq 10`; do
    echo "$i $(date)"
    sleep 1
done

And Lakefile:

#|-*- mode:lisp -*-|#
(defpackage :lake.user
  (:use :cl :lake)
  (:shadowing-import-from :lake
                          :directory))
(in-package :lake.user)

(task "default" ()
      (sh "./test.sh"))

Then start lake in the directory. Right now it will output lines:

[art@art-osx5:~/projects/lisp/lake]% lake
1 Sun Oct 21 12:27:10 MSK 2018
2 Sun Oct 21 12:27:11 MSK 2018
3 Sun Oct 21 12:27:12 MSK 2018
4 Sun Oct 21 12:27:13 MSK 2018
5 Sun Oct 21 12:27:14 MSK 2018
6 Sun Oct 21 12:27:15 MSK 2018
7 Sun Oct 21 12:27:16 MSK 2018
8 Sun Oct 21 12:27:17 MSK 2018
9 Sun Oct 21 12:27:18 MSK 2018
10 Sun Oct 21 12:27:19 MSK 2018

but this will happen at the end. However the progress should be updated continuously, every second.

Oh, this issue was closed few month ago by #83 pull