From 935efc2e96f1d5a7ab9bb446074b397f22b766bc Mon Sep 17 00:00:00 2001 From: humocs-man <251756307+humocs-man@users.noreply.github.com> Date: Sun, 15 Mar 2026 17:56:09 +0100 Subject: [PATCH] Refactor firstboot-setup.sh for improved readability --- files/etc/skel/.config/firstboot/firstboot-setup.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/files/etc/skel/.config/firstboot/firstboot-setup.sh b/files/etc/skel/.config/firstboot/firstboot-setup.sh index 7859735..4cc2575 100644 --- a/files/etc/skel/.config/firstboot/firstboot-setup.sh +++ b/files/etc/skel/.config/firstboot/firstboot-setup.sh @@ -76,7 +76,9 @@ choose_list() { --column="Beschreibung" \ --separator="|" \ "${rows[@]}"); then - printf '%s\n' "$result" + + # WICHTIG: Alle Zeilen zusammenführen → eine einzige Zeile + echo "$result" | tr -d '\n' return 0 else abort @@ -84,6 +86,7 @@ choose_list() { fi } + # ------------------------------------------------------------ # Welcome # ------------------------------------------------------------ @@ -113,14 +116,13 @@ run_list() { break else local code=$? - if [[ $code -eq 2 ]]; then - continue - fi + [[ $code -eq 2 ]] && continue exit 1 fi done } + # ------------------------------------------------------------ # Listen # ------------------------------------------------------------ @@ -203,7 +205,7 @@ Er eignet sich besonders für Entwickler und fortgeschrittene Nutzer.\n Möchtest du Homebrew installieren?" then echo "Installiere Homebrew (non‑interactive)…" - systemctl start firstboot-brew-install@"$USER".service + systemctl start firstboot-brew-install@"$USER".service & else echo "Homebrew wird nicht installiert." fi