diff options
| author | Jeff Carr <[email protected]> | 2025-10-03 06:49:33 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-03 06:49:33 -0500 |
| commit | 4574971b222384f3f0f1a5f41ce03ac7e495d682 (patch) | |
| tree | b1aba2cd3bb699cc170c252a0531459a981847a0 /apt.go | |
| parent | 322ec42ce6da80915a80ed36f02bc6a15c238fb2 (diff) | |
more argv options
Diffstat (limited to 'apt.go')
| -rw-r--r-- | apt.go | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -0,0 +1,30 @@ +// Copyright 2017-2025 WIT.COM Inc. All rights reserved. +// Use of this source code is governed by the GPL 3.0 + +package main + +import ( + "go.wit.com/log" +) + +func aptInstall(pkgname string) { + cmd := []string{"apt", "install", "-y", pkgname} + log.Info("Running:", cmd) + exitOnError(cmd) +} + +func aptRemove(pkgname string) { + if pkgname == "mirrors.wit.com" { + return + } + cmd := []string{"apt", "remove", "-y", pkgname} + log.Info("Running:", cmd) + exitOnError(cmd) +} + +func aptUpdate() { + cmd := []string{"apt", "update"} + exitOnError(cmd) + + aptInstall("wit-tools") +} |
