Files
Omeron/modules/core/preflight.sh
Pepe44DEV d8e7635b9f feat: paru auto-install + ASCII Header + Continue-Prompt
- paru wird jetzt in detect_environment() auf frischen Systemen installiert
  (vorher nur in preflight, das bei --fresh nie durchlief)
- install_aur_helper() von preflight nach utils.sh verschoben (global verfügbar)
- Header von Cherokee-Zeichen ('Ꮎ Ꮇ Ꭼ Ꮢ Ꮎ Ꮑ') auf ASCII ('O M E R O N')
  umgestellt — Cherokee zeigte auf manchen Terminals Fragezeichen
- Continue with installation? Prompt nach Banner als erster interaktiver Schritt
- basic mode header jetzt sauberes ASCII (===== statt Box-Zeichen)
2026-05-27 22:38:06 +02:00

72 lines
1.6 KiB
Bash
Executable File

#!/usr/bin/env bash
OMERON_FRESH_INSTALL=0
OMERON_DETECTED_GPU=""
module_description() {
printf "System Preflight - detect system state and missing dependencies\n"
}
module_required() { return 0; }
module_should_skip() { return 1; }
module_prereqs() {
require pacman pacman
is_arch || {
tui_error "This module requires an Arch-based system"
return 1
}
}
module_main() {
log_section "System Preflight Check"
OMERON_DETECTED_GPU="$(detect_gpu)"
export OMERON_DETECTED_GPU
system_summary
printf '\n'
if is_fresh_install; then
OMERON_FRESH_INSTALL=1
export OMERON_FRESH_INSTALL
tui_warn "Fresh system detected!"
tui_info "Hyprland is not installed and no desktop session is running."
printf '\n'
local gpu_name
gpu_name="$(lspci -nn 2>/dev/null | grep -E '\[0300\]|\[0302\]|\[0380\]' | sed 's/.*: //' | head -1 || echo "unknown")"
tui_bold "This installation will:"
tui_list \
"Hyprland compositor + tools" \
"GPU drivers for: ${gpu_name}" \
"Audio system (PipeWire)" \
"Network services (NetworkManager)" \
"Fonts and icon themes" \
"Dotfiles deployment"
printf '\n'
if ! tui_confirm "Proceed with full system setup?"; then
tui_info "Fresh installation aborted by user"
exit 0
fi
if ! have paru && ! have yay; then
install_aur_helper
fi
if ((!OMERON_HAS_GUM)) && have pacman; then
tui_install_gum 2>/dev/null || true
fi
tui_success "Preflight complete — ready for full installation"
else
tui_success "Existing Hyprland system detected"
tui_info "Will check for missing packages and updates."
fi
}