summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-09-09 08:41:15 -0500
committerJeff Carr <[email protected]>2025-09-09 08:41:15 -0500
commite629211edd82f3910cff3c3db2c272a48c01fa56 (patch)
tree37c746d27405b8ffb7adb521f7bfd1cd5ca3d731 /main.go
parent49820069c91df673727bc35d1ee0da395c278d4c (diff)
make args work again
Diffstat (limited to 'main.go')
-rw-r--r--main.go30
1 files changed, 6 insertions, 24 deletions
diff --git a/main.go b/main.go
index 0028c3d..ea2f6b9 100644
--- a/main.go
+++ b/main.go
@@ -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")
}