diff options
| author | Jeff Carr <[email protected]> | 2025-01-20 01:40:14 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-01-20 01:40:14 -0600 |
| commit | fb372aad6f0cca032c1ed7577cd7747b4daca7fb (patch) | |
| tree | 32dd9c7e763a1b3241518db4f80bb29479e41a69 /main.go | |
| parent | 96f2795bf3a96bdc9929ea1015590bb4695c4de0 (diff) | |
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 26 |
1 files changed, 2 insertions, 24 deletions
@@ -55,33 +55,11 @@ func main() { } if argv.Upgrade != nil { - if argv.DryRun { - log.Info("--dry-run", []string{"apt", "update"}) - } else { - result := shell.Run([]string{"apt", "update"}) - if result.Error != nil { - log.Info("apt update error:", result.Error) - badExit(result.Error) - } - } - - fmt.Println("Installed Packages:") - loop := me.forge.Machine.Wit.SortByName() - for loop.Scan() { - p := loop.Next() - // log.Info("apt install", name) - if me.forge.Machine.IsInstalled(p.Name) { - if argv.DryRun { - log.Info("--dry-run", []string{"apt", "install", p.Name}) - } else { - shell.RunRealtime([]string{"apt", "install", p.Name}) - } - } - } - okExit("installed") + doAptUpgrade() } if argv.ListPkgs != nil { + doAptList() log.DaemonMode(true) defer log.DaemonMode(false) fmt.Println("Installed Packages:") |
