diff options
| author | Jeff Carr <[email protected]> | 2025-10-07 19:31:00 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-07 19:31:00 -0500 |
| commit | 4be7ade52e35c3f9af51c7e4842f96a2f22971a8 (patch) | |
| tree | 4ce0683361bafcd9a4a3f1aee94bfb4ab252f463 /apt.go | |
| parent | 48bcafb2e388295567476f35e45b814f71692061 (diff) | |
switch to me.sh.Exit()v0.1.25
Diffstat (limited to 'apt.go')
| -rw-r--r-- | apt.go | 52 |
1 files changed, 0 insertions, 52 deletions
@@ -1,52 +0,0 @@ -// Copyright 2017-2025 WIT.COM Inc. All rights reserved. -// Use of this source code is governed by the GPL 3.0 - -package main - -/* -func aptInstall(pkgname string) (*cmd.Status, error) { - cmd := []string{"apt-get", "install", "-y", pkgname} - log.Info("Running:", cmd) - return shell.RunRealtimeError(cmd) -} - -func aptInstallOrExit(pkgname string) { - if _, err := aptInstall(pkgname); err != nil { - badExit(err) - } -} - -func aptRemove(pkgname string) (*cmd.Status, error) { - if pkgname == "mirrors.wit.com" { - return nil, nil - } - cmd := []string{"apt-get", "remove", "-y", pkgname} - log.Info("Running:", cmd) - return shell.RunRealtimeError(cmd) -} - -func aptRemoveOrExit(pkgname string) { - if _, err := aptRemove(pkgname); err != nil { - badExit(err) - } -} - -// apt-get update \ -// -o Dir::Etc::sourcelist=/etc/apt/sources.list.d/wit.list \ -// -o Dir::Etc::sourceparts=/dev/null \ -// -o APT::Get::List-Cleanup=0 -func aptUpdate() { - cmd := []string{"apt-get", "update"} - cmd = append(cmd, "-o", "Dir::Etc::sourcelist=/etc/apt/sources.list.d/wit.list") - 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 { - badExit(err) - } - - if found := me.machine.FindInstalledByName("wit-tools"); found == nil { - aptInstall("wit-tools") - } -} -*/ |
