Quiet dnf: spinner + package counts, full log kept for failures #7
+5
-2
@@ -107,14 +107,17 @@ ui_quiet_run() {
|
|||||||
# animates independently of gum and shows real progress, not just motion.
|
# animates independently of gum and shows real progress, not just motion.
|
||||||
"$@" >>"$log" 2>&1 &
|
"$@" >>"$log" 2>&1 &
|
||||||
local pid=$!
|
local pid=$!
|
||||||
local frames=( '⠋' '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏' )
|
# ASCII frames ONLY: braille/em-dash are multibyte UTF-8 and rendered as
|
||||||
|
# garbage letters when the session locale is not UTF-8 (VM-proven: the
|
||||||
|
# spinner appeared as changing random chars, not as a spinner).
|
||||||
|
local frames=( '|' '/' '-' '\\' )
|
||||||
local f=0 cur
|
local f=0 cur
|
||||||
while kill -0 "$pid" 2>/dev/null; do
|
while kill -0 "$pid" 2>/dev/null; do
|
||||||
cur=$(sed -n "$((before+1)),\$p" "$log" 2>/dev/null \
|
cur=$(sed -n "$((before+1)),\$p" "$log" 2>/dev/null \
|
||||||
| grep -E '^(Installing|Upgrading|Downgrading|Removing|Verifying|Preparing|Cleanup):' \
|
| grep -E '^(Installing|Upgrading|Downgrading|Removing|Verifying|Preparing|Cleanup):' \
|
||||||
| tail -n 1 || true)
|
| tail -n 1 || true)
|
||||||
if [[ -n "$cur" ]]; then
|
if [[ -n "$cur" ]]; then
|
||||||
printf '\r %s %s — %s' "${frames[$f]}" "$msg" "$cur" >&2
|
printf '\r %s %s: %s' "${frames[$f]}" "$msg" "$cur" >&2
|
||||||
else
|
else
|
||||||
printf '\r %s %s' "${frames[$f]}" "$msg" >&2
|
printf '\r %s %s' "${frames[$f]}" "$msg" >&2
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -220,7 +220,7 @@ if [[ -z "$SELINUX_OPT" ]]; then
|
|||||||
[[ "$choice" == "yes" ]] && SELINUX_DISABLED=true
|
[[ "$choice" == "yes" ]] && SELINUX_DISABLED=true
|
||||||
printf "\n"
|
printf "\n"
|
||||||
if findmnt -n -o FSTYPE / 2>/dev/null | grep -q btrfs; then
|
if findmnt -n -o FSTYPE / 2>/dev/null | grep -q btrfs; then
|
||||||
ok "Root filesystem is btrfs — snapshots + zstd compression will be set up."
|
ok "Root filesystem is btrfs: snapshots + zstd compression will be set up."
|
||||||
BTRFS_SNAPPER=true
|
BTRFS_SNAPPER=true
|
||||||
else
|
else
|
||||||
info "Root filesystem is not btrfs; skipping snapshot setup."
|
info "Root filesystem is not btrfs; skipping snapshot setup."
|
||||||
@@ -259,7 +259,7 @@ pause_if_debug
|
|||||||
if [[ -z "$DE" ]]; then
|
if [[ -z "$DE" ]]; then
|
||||||
step "4 Desktop environment"
|
step "4 Desktop environment"
|
||||||
rule
|
rule
|
||||||
color_gray " Bare Fedora install — picking a DE is what gives you a graphical login."
|
color_gray "Bare Fedora install: picking a DE is what gives you a graphical login."
|
||||||
choice=$(ui_choose "Desktop environment" "Select desktop environment:" \
|
choice=$(ui_choose "Desktop environment" "Select desktop environment:" \
|
||||||
"None (TWM only, SDDM via TWM module)" \
|
"None (TWM only, SDDM via TWM module)" \
|
||||||
"GNOME (gdm)" "Plasma (sddm)" "XFCE (sddm)" "None (TWM only, SDDM via TWM module)")
|
"GNOME (gdm)" "Plasma (sddm)" "XFCE (sddm)" "None (TWM only, SDDM via TWM module)")
|
||||||
|
|||||||
Reference in New Issue
Block a user