summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go33
1 files changed, 7 insertions, 26 deletions
diff --git a/main.go b/main.go
index 217d7dc..47afd34 100644
--- a/main.go
+++ b/main.go
@@ -10,10 +10,6 @@ import (
"path/filepath"
"unicode"
- "go.wit.com/lib/gui/prep"
- "go.wit.com/lib/protobuf/forgepb"
- "go.wit.com/lib/protobuf/gitpb"
- "go.wit.com/lib/protobuf/zoopb"
"go.wit.com/log"
)
@@ -24,35 +20,25 @@ var BUILDTIME string
// used for shell auto completion
var ARGNAME string = "wit" // 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)
- me.auto = prep.Bash3(&argv) // add support for bash autocomplete with go-arg
-
- dumpDebug()
+ me = new(mainType)
+ me.once.Do(initMain)
if argv.Upgrade != nil {
doUpgrade()
okExit("")
}
+ if argv.Debian != nil {
+ doDebian()
+ okExit("")
+ }
+
if argv.Git != nil {
doGit()
okExit("")
}
- failed = make(map[*gitpb.Repo]string)
- state = make(map[*gitpb.Repo]string)
- debnames = make(map[*gitpb.Repo]string)
-
- me.forge = forgepb.Init()
- me.forge.Config.DumpENV()
-
- me.machine, _ = zoopb.InitMachine()
-
if argv.Clone != nil {
if argv.RepoMap != "" {
repomap(argv.RepoMap)
@@ -107,11 +93,6 @@ func main() {
doListRepos()
- if argv.DebBuild != nil {
- buildDeb()
- okExit("")
- }
-
if argv.MakeInstall != nil {
if err := doInstall(); err != nil {
log.Info("doInstall() failed", err)