diff options
Diffstat (limited to 'softscript.go')
-rw-r--r-- | softscript.go | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/softscript.go b/softscript.go deleted file mode 100644 index 9924d54..0000000 --- a/softscript.go +++ /dev/null @@ -1,42 +0,0 @@ -package planr - -import ( - "io" - "os" - "os/exec" - "log" -) - -func RunCmd(name string, args ...string) { - cmd := exec.Command(name, args...) - - stderr, err := cmd.StderrPipe() - if err != nil { - log.Fatal(err); - } - - stdout, err := cmd.StdoutPipe() - if err != nil { - log.Fatal(err); - } - - go func() { - io.Copy(os.Stderr, stderr) - }() - - go func() { - io.Copy(os.Stdout, stdout) - }() - - if err := cmd.Start(); err != nil { - log.Fatal(err) - } - - if err != nil { - log.Fatal(err) - } - - if err := cmd.Wait(); err != nil { - log.Fatalf("Could not execute cmake command\n%v", err) - } -} |