-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathmain.go
More file actions
37 lines (31 loc) · 650 Bytes
/
main.go
File metadata and controls
37 lines (31 loc) · 650 Bytes
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
package main
import (
"fmt"
"os"
"github.com/codegangsta/cli"
"github.com/miketheprogrammer/go-thrust/lib/spawn"
)
func install(c *cli.Context) {
spawn.SetBaseDirectory("") // Default to usr.homedir.
tp := spawn.NewThrustProvisioner()
if err := tp.Provision(); err != nil {
panic(err)
}
fmt.Println("Thrust installed")
}
func main() {
app := cli.NewApp()
app.Name = "go-thrust"
app.Usage = "Tools to developp Thrust applications in Go"
app.Commands = []cli.Command{
{
Name: "install",
ShortName: "i",
Usage: "Install Thrust",
Action: func(c *cli.Context) {
install(c)
},
},
}
app.Run(os.Args)
}