-
Notifications
You must be signed in to change notification settings - Fork 3
/
main.go
39 lines (33 loc) · 876 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package main
import (
"flag"
"fmt"
"os"
"os/exec"
kaizen "github.com/serene-brew/Kaizen/src"
)
// Main entrypoint for the application
func main() {
// perform auto-heal check before starting kaizen
kaizen.AutoHeal()
// check whether MPV-player is installed or not
_, err := exec.LookPath("mpv")
if err != nil {
fmt.Println("[!] Please install MPV-player using your package manager before running kaizen")
os.Exit(1)
}
// kaizen CLI flags
uninstalFlag := flag.Bool("uninstall", false, "Run the uninstaller script")
updateFlag := flag.Bool("update", false, "Run the update script")
versionFlag := flag.Bool("v", false, "views version information")
flag.Parse()
if *uninstalFlag {
kaizen.RunUninstalScript()
} else if *versionFlag {
kaizen.ViewVersion()
} else if *updateFlag {
kaizen.RunUpdateScript()
} else {
kaizen.ExecuteAppStub()
}
}