diff options
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 30 |
1 files changed, 6 insertions, 24 deletions
@@ -11,7 +11,7 @@ import ( "unicode" "go.wit.com/dev/alexflint/arg" - "go.wit.com/lib/gui/shell" + "go.wit.com/lib/gui/prep" "go.wit.com/lib/protobuf/forgepb" "go.wit.com/lib/protobuf/gitpb" "go.wit.com/lib/protobuf/zoopb" @@ -22,22 +22,19 @@ import ( var VERSION string var BUILDTIME string +// used for shell auto completion +var ARGNAME string = "wit-test" // todo: get this from $0 ? + var failed map[*gitpb.Repo]string var state map[*gitpb.Repo]string var debnames map[*gitpb.Repo]string func main() { me = new(autoType) + prep.Bash(ARGNAME, argv.DoAutoComplete) // todo: this line should be: prep.Bash(argv) + // me.myGui = prep.Gui() // prepares the GUI package for go-args me.argpp = arg.MustParse(&argv) - if argv.Bash { - argv.doBash() - os.Exit(0) - } - if len(argv.BashAuto) != 0 { - argv.doBashAuto() - os.Exit(0) - } dumpDebug() failed = make(map[*gitpb.Repo]string) @@ -120,21 +117,6 @@ func main() { okExit("EVERYTHING BUILT!") } - if argv.Test { - homeDir, _ := os.UserHomeDir() - - testdir := filepath.Join(homeDir, "go/src/go.wit.com/apps/utils/wit-utils/go-clone-test/") - os.Chdir(testdir) - shell.RunRealtime([]string{"go", "install"}) - - workdir := filepath.Join(homeDir, "gowork") - if err := os.MkdirAll(workdir, os.ModePerm); err != nil { - badExit(err) - } - os.Chdir(workdir) - shell.RunRealtime([]string{"go-clone-test"}) - } - okExit("everything compiled") } |
