summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-07 08:00:16 -0500
committerJeff Carr <[email protected]>2025-10-07 08:00:16 -0500
commitf46ce34f817930945fd5de53a8cdf4a10b62bded (patch)
treea67b2e3af0d0ab478c67c87b27a84951604fd419
parent7d24a00f52238bf6e6298c1e62d7c2bf11b67edd (diff)
more things moving away from shell
-rw-r--r--apt.go12
1 files changed, 4 insertions, 8 deletions
diff --git a/apt.go b/apt.go
index febf66d..1854790 100644
--- a/apt.go
+++ b/apt.go
@@ -5,14 +5,14 @@ package debian
import (
"github.com/go-cmd/cmd"
- "go.wit.com/lib/gui/shell"
+ "go.wit.com/lib/fhelp"
"go.wit.com/log"
)
func AptInstall(pkgname string) (*cmd.Status, error) {
cmd := []string{"apt-get", "install", "-y", pkgname}
log.Info("Running:", cmd)
- return shell.RunRealtimeError(cmd)
+ return fhelp.RunRealtimeError(cmd)
}
func AptInstallOrExit(pkgname string) error {
@@ -28,7 +28,7 @@ func AptRemove(pkgname string) (*cmd.Status, error) {
}
cmd := []string{"apt-get", "remove", "-y", pkgname}
log.Info("Running:", cmd)
- return shell.RunRealtimeError(cmd)
+ return fhelp.RunRealtimeError(cmd)
}
func AptRemoveOrExit(pkgname string) error {
@@ -48,12 +48,8 @@ func AptUpdate() error {
cmd = append(cmd, "-o", "Dir::Etc::sourceparts=/dev/null")
cmd = append(cmd, "-o", "APT::Get::List-Cleanup=0")
log.Info("Running:", cmd)
- if _, err := shell.RunRealtimeError(cmd); err != nil {
+ if _, err := fhelp.RunRealtimeError(cmd); err != nil {
return err
}
-
- // if found := me.machine.FindInstalledByName("wit-tools"); found == nil {
- // AptInstall("wit-tools")
- // }
return nil
}