diff options
Diffstat (limited to 'doBuild.go')
| -rw-r--r-- | doBuild.go | 80 |
1 files changed, 40 insertions, 40 deletions
@@ -29,13 +29,52 @@ func doBuild() error { } if argv.Build.Debian != nil { - doOnlyDebianPackages() + doBuildDeb() okExit("") } return nil } +func doInstall() error { + initForge() + doInstallScan() + + found := gitpb.NewRepos() + for check := range me.forge.Repos.IterAll() { + if me.forge.Config.IsReadOnly(check.Namespace) { + continue + } + + if !check.IsBinary() { + continue + } + + if check.IsGoPlugin() { + continue + } + found.Append(check) + } + me.forge.PrintForgedTable(found) + + if argv.DryRun { + okExit("") + } + + me.forge.ConfigRill(16, 16) + stats := me.forge.RunOnRepos(found, doInstallRepo) + for s, stat := range stats { + if stat.Err == nil { + continue + } + dur := stat.End.Sub(stat.Start) + log.Info("CRAP. INSTALL FAILED", shell.FormatDuration(dur), s, stat.Err) + badExit(stat.Err) + } + os.Remove(filepath.Join(me.homedir, "go/bin/forged")) + return nil +} + func doInstallRepo(check *gitpb.Repo) error { repotype := check.GetRepoType() if repotype == "binary" || repotype == "plugin" { @@ -152,42 +191,3 @@ func doInstallScan() { } } } - -func doInstall() error { - initForge() - doInstallScan() - - found := gitpb.NewRepos() - for check := range me.forge.Repos.IterAll() { - if me.forge.Config.IsReadOnly(check.Namespace) { - continue - } - - if !check.IsBinary() { - continue - } - - if check.IsGoPlugin() { - continue - } - found.Append(check) - } - me.forge.PrintForgedTable(found) - - if argv.DryRun { - okExit("") - } - - me.forge.ConfigRill(16, 16) - stats := me.forge.RunOnRepos(found, doInstallRepo) - for s, stat := range stats { - if stat.Err == nil { - continue - } - dur := stat.End.Sub(stat.Start) - log.Info("CRAP. INSTALL FAILED", shell.FormatDuration(dur), s, stat.Err) - badExit(stat.Err) - } - os.Remove(filepath.Join(me.homedir, "go/bin/forged")) - return nil -} |
