automaton-build.tasks.impl.actions.cmds
Wrap command functions with action echoing.
blocking-cmd
(blocking-cmd prefixs cmd dir err-message verbose?)
Execute a command in the blocking mode, so the result is returned when the function is returned.
Print the command cmd
if verbose is true
, and execute cmd
in directory dir
. The prefixs
are added, the err-message
also if an error occur.
chain-cmds
(chain-cmds cmd-chain)
clj-parameterize
(clj-parameterize par)
Turns par
into a parameter understood by a clojure cli
.
echoed-cmd
(echoed-cmd cmd-str)
Wrap a command string cmd-str
before printing to be seen as a uri in the terminal.
exec-cmd-str
(exec-cmd-str cmd-str)
Returns the string of the execution of a command cmd-str
force-dirs
(force-dirs cmd-chain dir)
kill
(kill process)
long-living-cmd
(long-living-cmd prefixs cmd dir refresh-delay verbose? out-filter-fn err-filter-fn)
Execute and print command cmd
that is a long living one. So all outputs will be displayed with prefixs.
As there are listeners to achieve that, the refresh-delay
is specifying the delay between two refreshs.
With out-filter-fn
you can decide which lines you display or not, knowing that (constantly true) will accept them all. With err-filter-fn
you can decide which lines you display or not, knowing that (constantly true) will accept them all.
If there is no need or no will to wait for the end of the command, just call it in a future.
print-cmd-str
(print-cmd-str prefixs cmd-str)
Print the command string cmd-str
.
print-exec-cmd-str
(print-exec-cmd-str prefixs cmd-str dir)
Print a message telling the execution of the command string cmd-str
.
success
(success result)
Returns true
if the result is a success