Skip to content

Commit

Permalink
Loud grep
Browse files Browse the repository at this point in the history
  • Loading branch information
infogulch committed Jul 3, 2024
1 parent 3d97a60 commit 07ddb76
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions make_tool.cue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"tool/os"

// "encoding/json"
"tool/cli"
// "tool/cli"
)

#vars: {
Expand Down Expand Up @@ -72,19 +72,11 @@ task: run: {
gobuild: task.build & {"vars": vars, outfile: "\(vars.testdir)/xtemplate"}
rmdataw: file.RemoveAll & {path: "\(vars.testdir)/dataw"}
mkdataw: file.Mkdir & {path: "\(vars.testdir)/dataw", $dep: rmdataw.$done}
mklog: file.Create & {filename: "\(vars.testdir)/xtemplate.log", permissions: 0o666, contents: "hello world!\n"}
read: file.Read & {filename: mklog.filename, contents: string, $after: mklog}
prt: cli.Print & {text: "CONTENTS: " + read.contents}
mklog: file.Create & {filename: "\(vars.testdir)/xtemplate.log", contents: ""}

ready: exec.Run & {
$dep: mklog.$done
cmd: ["bash", "-c", "grep -q 'starting server' <(tail -f \(mklog.filename))"]
dir: vars.testdir
}
display: exec.Run & {
$dep: mklog.$done
cmd: ["bash", "-c", "echo DISPLAY; ls -la '\(mklog.filename)'; sleep 1; ls -la '\(mklog.filename)'"]
dir: vars.testdir
cmd: ["bash", "-c", "grep 'starting server' <(tail -f \(mklog.filename))"]
}

start: exec.Run & {
Expand Down

0 comments on commit 07ddb76

Please sign in to comment.