-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
49 lines (45 loc) · 840 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
40
41
42
43
44
45
46
47
48
49
package main
import (
"github.com/lucaber/deckjoy/pkg/cmd"
"github.com/lucaber/deckjoy/pkg/setup"
"github.com/urfave/cli/v2"
"log"
"os"
"runtime"
)
func main() {
runtime.LockOSThread()
app := &cli.App{
Commands: []*cli.Command{
{
Name: "daemon",
Usage: "daemon to configure the steam deck; start with root permissions",
Action: cmd.RunDaemon,
},
{
Name: "cleanup",
Usage: "remove usb gadget",
Action: func(*cli.Context) error {
deckSetup, err := setup.NewDeck()
if err != nil {
return err
}
err = deckSetup.Destroy()
if err != nil {
return err
}
return nil
},
},
{
Name: "gui",
Usage: "show gui",
Action: cmd.RunGui,
},
},
Action: cmd.RunGui,
}
if err := app.Run(os.Args); err != nil {
log.Fatal(err)
}
}