diff 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") +} |
