Add utility function for simple package management

This commit is contained in:
2025-09-28 02:17:31 -04:00
parent 8b265cd3d9
commit f84f304466
6 changed files with 27 additions and 90 deletions
+1 -11
View File
@@ -1,11 +1,5 @@
package main
import (
"os/exec"
"github.com/rwinkhart/go-boilerplate/other"
)
func cosmic() {
version := "/v1/"
filenamesToValues := map[string]string{
@@ -37,9 +31,5 @@ func cosmic() {
manageService("stop", "sddm.service")
manageService("disable", "sddm.service")
manageService("enable", "greetd.service")
cmd := exec.Command("pacman", "-Rcns", "sddm", "--noconfirm")
err := cmd.Run()
if err != nil {
other.PrintError("Failed to remove SDDM", 1)
}
managePackage("-Rcns", "sddm")
}