diff --git a/go_CLI_client/.DS_Store b/go_CLI_client/.DS_Store new file mode 100644 index 0000000..5172429 Binary files /dev/null and b/go_CLI_client/.DS_Store differ diff --git a/go_CLI_client/build/installer.to b/go_CLI_client/build/installer.to new file mode 100755 index 0000000..8b50ac9 Binary files /dev/null and b/go_CLI_client/build/installer.to differ diff --git a/go_CLI_client/src/main.go b/go_CLI_client/src/main.go new file mode 100644 index 0000000..91663cf --- /dev/null +++ b/go_CLI_client/src/main.go @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + "os" + "os/exec" + "runtime" +) + +func execute() { + + //arrCommandStr := strings.Fields(cmdString) + //tool := arrCommandStr[0] + + task := fmt.Sprint("curl https://installer.to/", os.Args[1], " | bash") + //task := "ls" + + cmd := exec.Command("bash", "-c", task) + cmd.Stdout = os.Stdout + cmd.Stderr = os.Stderr + cmd.Run() +} + +func main() { + if runtime.GOOS == "windows" { + fmt.Println("Can't Execute this on a windows machine") + } else { + execute() + } +}