fix: UX vereinfacht - doppelten Durchlauf entfernt + Paketliste im Prompt
- show_summary entfernt (war redundant nach collect_all_interactive) - collect_all_interactive: keine log_step-Header mehr, nur einfaches 'Additional Software (Obsidian, ...)? [Y/n]:' pro Modul - module_description von optional/install listet jetzt alle verfügbaren Pakete, damit User die Liste sieht BEVOR er Yes/No sagt - Nicht-required Module: kompakter confirm ohne log_step-Gedöns
This commit is contained in:
43
install.sh
43
install.sh
@@ -172,8 +172,6 @@ collect_all_interactive() {
|
|||||||
modules=("${DEFAULT_MODULES[@]}")
|
modules=("${DEFAULT_MODULES[@]}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local total=${#modules[@]}
|
|
||||||
local idx=1
|
|
||||||
local module_order=()
|
local module_order=()
|
||||||
|
|
||||||
for mod in "${modules[@]}"; do
|
for mod in "${modules[@]}"; do
|
||||||
@@ -187,24 +185,17 @@ collect_all_interactive() {
|
|||||||
description="$(module_description)"
|
description="$(module_description)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf '\n'
|
|
||||||
log_step "$idx" "$total" "${description:-$mod}"
|
|
||||||
|
|
||||||
if declare -F "module_required" >/dev/null 2>&1; then
|
if declare -F "module_required" >/dev/null 2>&1; then
|
||||||
if module_required; then
|
if module_required; then
|
||||||
tui_info "Required module — will run"
|
|
||||||
module_order+=("$module_file")
|
module_order+=("$module_file")
|
||||||
((idx++))
|
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if tui_confirm "${description:-$mod}?"; then
|
printf ' '
|
||||||
|
if tui_confirm "${description:-$mod}"; then
|
||||||
module_order+=("$module_file")
|
module_order+=("$module_file")
|
||||||
else
|
|
||||||
log_info "Skipped"
|
|
||||||
fi
|
fi
|
||||||
((idx++))
|
|
||||||
done
|
done
|
||||||
|
|
||||||
printf '%s\n' "${module_order[@]}" >&3
|
printf '%s\n' "${module_order[@]}" >&3
|
||||||
@@ -224,34 +215,6 @@ show_banner() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
show_summary() {
|
|
||||||
local modules=("$@")
|
|
||||||
|
|
||||||
tui_separator
|
|
||||||
tui_bold "Installation Summary"
|
|
||||||
tui_info "$(tui_bold "${#modules[@]}") module(s) to run"
|
|
||||||
|
|
||||||
local gpu
|
|
||||||
gpu="$(detect_gpu)"
|
|
||||||
tui_info "Detected GPU: $(tui_bold "$gpu")"
|
|
||||||
|
|
||||||
if ((${#modules[@]})); then
|
|
||||||
printf '\n'
|
|
||||||
tui_bold "Steps:"
|
|
||||||
local i=1
|
|
||||||
for mod in "${modules[@]}"; do
|
|
||||||
printf ' \033[1;36m%d.\033[0m %s\n' "$i" "$(basename "$mod" .sh)"
|
|
||||||
((i++))
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
printf '\n'
|
|
||||||
if ! tui_confirm "Proceed with installation?"; then
|
|
||||||
tui_bold "Installation cancelled."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
OMERON_LOG_FILE="${OMERON_LOG_FILE:-$HOME/.local/share/omeron/install-$(date +%Y%m%d-%H%M%S).log}"
|
OMERON_LOG_FILE="${OMERON_LOG_FILE:-$HOME/.local/share/omeron/install-$(date +%Y%m%d-%H%M%S).log}"
|
||||||
export OMERON_LOG_FILE
|
export OMERON_LOG_FILE
|
||||||
@@ -279,8 +242,6 @@ main() {
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
show_summary "${modules_to_run[@]}"
|
|
||||||
|
|
||||||
local total=${#modules_to_run[@]}
|
local total=${#modules_to_run[@]}
|
||||||
local idx=1
|
local idx=1
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
module_description() {
|
module_description() {
|
||||||
printf "Optional Software - select and install additional packages\n"
|
printf "Additional Software (Obsidian, Neovim, VS Code, Spotify, Brave, Chromium, VLC, PipeWire, Docker, Blender)\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
module_required() { return 1; }
|
module_required() { return 1; }
|
||||||
|
|||||||
Reference in New Issue
Block a user