diff options
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 35 |
1 files changed, 22 insertions, 13 deletions
@@ -20,6 +20,12 @@ var cBox *controlBox var basicWindow *gadgets.BasicWindow func main() { + if args.Repo == "" { + log.Info("You need to tell me what repo you want to work on") + println("") + println("go-deb --repo go.wit.com/apps/helloworld") + os.Exit(0) + } if debugger.ArgDebug() { log.SetAll(true) log.ShowFlags() @@ -33,20 +39,18 @@ func main() { basicWindow = makebasicWindow() - if args.Repo != "" { - filepath := filepath.Join("/home/jcarr/go/src", args.Repo) - os.Chdir(filepath) + filepath := filepath.Join("/home/jcarr/go/src", args.Repo) + os.Chdir(filepath) - cBox.addRepo(args.Repo) - cBox.readControlFile() - basicWindow.Show() - // go will sit here until the window exits - gui.Watchdog() - } - if args.OpenGui { - basicWindow.Show() - // go will sit here until the window exits - gui.Watchdog() + cBox.addRepo(args.Repo) + cBox.readControlFile() + if args.NoGui { + if cBox.buildPackage() { + log.Info("build worked") + } else { + log.Warn("build failed") + } + os.Exit(0) } // run the debugger if triggered from the commandline @@ -56,4 +60,9 @@ func main() { debugger.DebugWindow() }() } + + basicWindow.Show() + // go will sit here until the window exits + gui.Watchdog() + os.Exit(0) } |
