aboutsummaryrefslogtreecommitdiff
path: root/dirtyscripting.go
diff options
context:
space:
mode:
Diffstat (limited to 'dirtyscripting.go')
-rw-r--r--dirtyscripting.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/dirtyscripting.go b/dirtyscripting.go
index 9924d54..ee8531d 100644
--- a/dirtyscripting.go
+++ b/dirtyscripting.go
@@ -7,9 +7,7 @@ import (
"log"
)
-func RunCmd(name string, args ...string) {
- cmd := exec.Command(name, args...)
-
+func Exec(cmd * exec.Cmd) {
stderr, err := cmd.StderrPipe()
if err != nil {
log.Fatal(err);
@@ -40,3 +38,9 @@ func RunCmd(name string, args ...string) {
log.Fatalf("Could not execute cmake command\n%v", err)
}
}
+
+func RunCmd(name string, args ...string) {
+ cmd := exec.Command(name, args...)
+
+ Exec(cmd)
+}