summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go19
1 files changed, 4 insertions, 15 deletions
diff --git a/main.go b/main.go
index ff0e7a8..3610038 100644
--- a/main.go
+++ b/main.go
@@ -9,6 +9,7 @@ import (
"go.wit.com/gui"
"go.wit.com/lib/gui/gowit"
"go.wit.com/lib/gui/shell"
+ "go.wit.com/lib/protobuf/forgepb"
"go.wit.com/log"
)
@@ -23,16 +24,9 @@ func main() {
me = new(autoType)
// load the ~/.config/forge/ config
- if err := me.forge.ConfigLoad(); err != nil {
- log.Warn("forgepb.ConfigLoad() failed", err)
- os.Exit(-1)
- }
-
- // load the ~/.config/forge/ machine file from zoopb
- if err := me.machine.ConfigLoad(); err != nil {
- log.Warn("zoopb.ConfigLoad() failed", err)
- os.Exit(-1)
- }
+ me.forge = forgepb.Init()
+ me.forge.ConfigPrintTable()
+ os.Setenv("REPO_WORK_PATH", me.forge.GetGoSrc())
// parse the command line
arg.MustParse(&myargs)
@@ -111,10 +105,6 @@ func main() {
me.release.box.Disable()
me.Disable()
- // parse config file and scan for .git repos
- me.repos.initRepoList()
- // setTargetVersion()
-
// register a Show/Hide function for the repo list table
me.repos.View.RegisterHideFunction(hideFunction)
@@ -122,7 +112,6 @@ func main() {
// TODO: should not really be necessary directly after init()
me.repos.View.ScanRepositories()
-
loop := me.repos.View.ReposSortByName()
for loop.Scan() {
repo := loop.Repo()