minor rearrange

This commit is contained in:
Jeff Carr 2025-02-22 07:59:19 -06:00
parent ba514f7827
commit ec11efc347
3 changed files with 27 additions and 12 deletions

View File

@ -5,13 +5,11 @@ package main
*/
import (
"go.wit.com/gui"
"go.wit.com/lib/debugger"
"go.wit.com/log"
)
func init() {
gui.InitArg()
if debugger.ArgDebug() {
log.Info("cmd line --debugger == true")
go func() {

View File

@ -43,6 +43,7 @@ func getVersion(repo *gitpb.Repo, name string) string {
func main() {
me = new(mainType)
gui.InitArg()
me.pp = arg.MustParse(&argv)
if argv.Bash {

View File

@ -49,37 +49,53 @@ func makeHowtoWin() *genericWindow {
cmd := []string{"go", "install", "go.wit.com/apps/go-clone@latest"}
shell.RunRealtime(cmd)
}
if path, err := fhelp.CheckCmd("go-clone2"); err != nil {
log.Info("go-clone2 missing", path, err)
if _, err := fhelp.CheckCmd("autogenpb"); err != nil {
cmd := []string{"go", "install", "go.wit.com/apps/autogenpb@latest"}
shell.RunRealtime(cmd)
}
if _, err := fhelp.CheckCmd("go-mod-clean"); err != nil {
cmd := []string{"go", "install", "go.wit.com/apps/go-mod-clean@latest"}
shell.RunRealtime(cmd)
}
if path, err := fhelp.CheckCmd("go-clone"); err != nil {
log.Info("can't prep build. you probably need ~/go/bin in your PATH", path, err)
return
}
var basecmd []string
var cmd []string
if me.forge.IsGoWork() {
cmd = []string{"go-clone", "--work", "--recursive"}
log.Info("NOT GO WORK")
basecmd = []string{"go-clone", "--work", "--recursive"}
} else {
cmd = []string{"go-clone", "--recursive"}
log.Info("IS GO WORK")
basecmd = []string{"go-clone", "--recursive"}
}
// log.Info("Running:", cmd)
// shell.RunRealtime(cmd)
cmd = append(basecmd, "go.wit.com/apps/go-mod-clean")
log.Info("Running:", cmd)
shell.RunRealtime(cmd)
cmd = []string{"go-clone", "--recursive", "go.wit.com/apps/go-mod-clean"}
cmd = append(basecmd, "go.wit.com/apps/forge")
log.Info("Running:", cmd)
shell.RunRealtime(cmd)
cmd = []string{"go-clone", "--recursive", "go.wit.com/apps/forge"}
cmd = append(basecmd, "go.wit.com/toolkits/gocui")
log.Info("Running:", cmd)
shell.RunRealtime(cmd)
cmd = []string{"go-clone", "--recursive", "go.wit.com/toolkits/gocui"}
cmd = append(basecmd, "go.wit.com/toolkits/andlabs")
log.Info("Running:", cmd)
shell.RunRealtime(cmd)
cmd = []string{"go-clone", "--recursive", "go.wit.com/toolkits/andlabs"}
log.Info("Running:", cmd)
shell.RunRealtime(cmd)
// should, after go-clone, be able to go build
/*
repo := me.forge.FindByGoPath("go.wit.com/lib/proto/forgepb")
if repo != nil {
repo.RunVerbose([]string{"autogenpb"})
}
*/
})
return howtoWin
}