File tree Expand file tree Collapse file tree 3 files changed +37
-0
lines changed Expand file tree Collapse file tree 3 files changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ package main
2
+
3
+ import (
4
+ "fmt"
5
+ "os"
6
+
7
+ "github.com/codegangsta/cli"
8
+ "github.com/miketheprogrammer/go-thrust/lib/spawn"
9
+ )
10
+
11
+ func install (c * cli.Context ) {
12
+ spawn .SetBaseDirectory ("" ) // Default to usr.homedir.
13
+ tp := spawn .NewThrustProvisioner ()
14
+ if err := tp .Provision (); err != nil {
15
+ panic (err )
16
+ }
17
+ fmt .Println ("Thrust installed" )
18
+ }
19
+
20
+ func main () {
21
+ app := cli .NewApp ()
22
+ app .Name = "go-thrust"
23
+ app .Usage = "Tools to developp Thrust applications in Go"
24
+
25
+ app .Commands = []cli.Command {
26
+ {
27
+ Name : "install" ,
28
+ ShortName : "i" ,
29
+ Usage : "Install Thrust" ,
30
+ Action : func (c * cli.Context ) {
31
+ install (c )
32
+ },
33
+ },
34
+ }
35
+
36
+ app .Run (os .Args )
37
+ }
File renamed without changes.
File renamed without changes.
You can’t perform that action at this time.
0 commit comments