You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
503 B
30 lines
503 B
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os/exec"
|
|
"log"
|
|
"errors"
|
|
"lcthw.dev/learn-code-the-hard-way/ozai/config"
|
|
)
|
|
|
|
func main() {
|
|
config.Load()
|
|
|
|
fmt.Println("CONFIG:", config.Settings.ConfigPath)
|
|
fmt.Println("COMMANDs:", config.Settings.Processes)
|
|
|
|
cmd := exec.Command(config.Settings.Processes["ssgod"].Command)
|
|
if errors.Is(cmd.Err, exec.ErrDot) {
|
|
cmd.Err = nil
|
|
}
|
|
|
|
out, err := cmd.CombinedOutput()
|
|
|
|
if err != nil {
|
|
fmt.Printf("%s\n", out)
|
|
log.Fatal(err)
|
|
}
|
|
|
|
cmd.Wait()
|
|
}
|
|
|