From 07ddb766560376bfffe731e5848c70e64d17bfbc Mon Sep 17 00:00:00 2001 From: infogulch Date: Wed, 3 Jul 2024 14:29:29 -0500 Subject: [PATCH] Loud grep --- make_tool.cue | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/make_tool.cue b/make_tool.cue index ed31fe6..3d44e95 100644 --- a/make_tool.cue +++ b/make_tool.cue @@ -9,7 +9,7 @@ import ( "tool/os" // "encoding/json" - "tool/cli" + // "tool/cli" ) #vars: { @@ -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 & {