mirror of
https://github.com/rwinkhart/cachyos-postinstall-helper.git
synced 2026-09-06 09:07:18 -04:00
Remove "bash" from removals
This commit is contained in:
+1
-13
@@ -1,30 +1,18 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"os/exec"
|
|
||||||
|
|
||||||
"github.com/rwinkhart/go-boilerplate/front"
|
"github.com/rwinkhart/go-boilerplate/front"
|
||||||
"github.com/rwinkhart/go-boilerplate/other"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func removals() {
|
func removals() {
|
||||||
for {
|
for {
|
||||||
var doAll bool
|
var doAll bool
|
||||||
choice := front.InputMenuGen("Application to remove:", []string{"back", "all", "bash", "linux-cachyos-lts"})
|
choice := front.InputMenuGen("Application to remove:", []string{"back", "all", "linux-cachyos-lts"})
|
||||||
var target string
|
var target string
|
||||||
switch choice {
|
switch choice {
|
||||||
case 1:
|
case 1:
|
||||||
return
|
return
|
||||||
case 2:
|
case 2:
|
||||||
cmd := exec.Command("pacman", "-Rcns", "bash", "linux-cachyos-lts", "--noconfirm")
|
|
||||||
err := cmd.Run()
|
|
||||||
if err != nil {
|
|
||||||
other.PrintError("Failed to perform application removals", 1)
|
|
||||||
}
|
|
||||||
doAll = true
|
|
||||||
case 3:
|
|
||||||
target = "bash"
|
|
||||||
case 4:
|
|
||||||
target = "linux-cachyos-lts"
|
target = "linux-cachyos-lts"
|
||||||
}
|
}
|
||||||
if !doAll {
|
if !doAll {
|
||||||
|
|||||||
Reference in New Issue
Block a user