From 3b14d5a1248e8398bd81508771132698dd86acaf Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 16 Jan 2024 04:46:17 -0600 Subject: code reorg. add more buttons to dream about Signed-off-by: Jeff Carr --- unix.go | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) (limited to 'unix.go') diff --git a/unix.go b/unix.go index 30793d1..d045967 100644 --- a/unix.go +++ b/unix.go @@ -13,7 +13,7 @@ var repopath string = "/home/jcarr/" // but doesn't do anything func goMake(dryRun string) bool { var workingPath string = "go/src" - for _, line := range script { + for _, line := range me.script { if len(line) == 0 { continue } @@ -40,7 +40,7 @@ func goMake(dryRun string) bool { } if dryRun == "--doit" { log.Warn("Actually RUN path =", path, "cmd =", cmd, s) - err, b, output := repostatus.RunCmd(repopath, line) + err, b, output := repostatus.RunCmd(path, line) if err != nil { log.Info("ABEND EXECUTION") log.Info("error =", err) @@ -48,7 +48,7 @@ func goMake(dryRun string) bool { log.Info("output =", output) return false } - log.Warn("output was =", output) + // log.Warn("output was =", output) continue } log.Warn("don't know what to do. dryRun ==", dryRun) @@ -57,8 +57,20 @@ func goMake(dryRun string) bool { return true } -func runCommands() bool { - for _, line := range script { +func setGitCommands() { + var tmp []string + // convert to displayable to the user text + for _, line := range me.script { + s := strings.Join(line, " ") + log.Warn("s =", s) + tmp = append(tmp, s) + } + cmds.Set(strings.Join(tmp, "\n")) +} + +/* +func runCommandsOld() bool { + for _, line := range me.script { s := strings.Join(line, " ") log.Warn("NEED TO RUN:", s) err, b, output := repostatus.RunCmd(repopath, line) @@ -74,15 +86,4 @@ func runCommands() bool { } return true } - -func setGitCommands() { - var tmp []string - // convert to displayable to the user text - for _, line := range script { - s := strings.Join(line, " ") - log.Warn("s =", s) - tmp = append(tmp, s) - } - cmds.Set(strings.Join(tmp, "\n")) -} - +*/ -- cgit v1.2.3