1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-30 17:42:06 -04:00

Revert "system updater: make all distros use terminal"

This reverts commit 1467f5dba9.
This commit is contained in:
bbedward
2026-04-29 14:56:54 -04:00
parent 1467f5dba9
commit 3b96c6ab22
15 changed files with 222 additions and 98 deletions

View File

@@ -6,7 +6,6 @@ import (
"encoding/json"
"fmt"
"os"
"os/exec"
"strings"
"time"
@@ -184,20 +183,10 @@ func runSystemUpdateApply() {
DryRun: sysUpdateDry,
}
onLine := func(line string) { fmt.Println(line) }
for _, b := range backends {
cmd, err := b.UpgradeCommand(opts)
if err != nil {
log.Fatalf("%s: %v", b.ID(), err)
}
if cmd == "" {
continue
}
fmt.Printf("\n== %s ==\n$ %s\n\n", b.DisplayName(), cmd)
shell := exec.CommandContext(ctx, "sh", "-c", cmd)
shell.Stdin = os.Stdin
shell.Stdout = os.Stdout
shell.Stderr = os.Stderr
if err := shell.Run(); err != nil {
fmt.Printf("\n== %s ==\n", b.DisplayName())
if err := b.Upgrade(ctx, opts, onLine); err != nil {
log.Fatalf("%s upgrade failed: %v", b.ID(), err)
}
}