Initially I wasn't 100% clear or decided on the send/recv semantics. After some experimenting, I think this is much closer to what we want. Nothing should break or regress here, this only enables more possibilities.
21 lines
369 B
Plaintext
21 lines
369 B
Plaintext
import "os"
|
|
|
|
$f = "/tmp/export1"
|
|
exec "a" {
|
|
shell => "/bin/bash",
|
|
cmd => "echo hello | tee ${f}",
|
|
creates => "${f}",
|
|
send_output => os.readfile("${f}"), # extra graph event but safer in debug
|
|
|
|
Before => File["${f}"],
|
|
}
|
|
|
|
file "${f}" {
|
|
state => $const.res.file.state.exists,
|
|
mode => "ug=rw,o=",
|
|
|
|
Meta:export => ["*",],
|
|
}
|
|
|
|
Exec["a"].output -> File["${f}"].content
|