ceos-alpine-installer/ce-install.sh
John A. Hoeven a194c14077 Add CE OS Alpine installer v0.0.1 — Tier 0/1/2 dev scaffold
Staged installer set for Alpine Linux x86-64 (tinkerpad/ThinkPad T480).
Covers Base (Tier 0), Minimal (Tier 1), and Basic (Tier 2) tiers with
full phased structure, per-package error capture, and re-runnable test suites.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10 02:25:38 +02:00

63 lines
2.1 KiB
Bash

#!/usr/bin/env bash
# Created by John A. Hoeven with the ethical assistance of Claude AI
# ---------------------------------------------------------------------------
# ce-install.sh
# ~/projects/ceos/alpine-installer/ce-install.sh
# Version: v0.0.1 | Status: DEVELOPMENT
# Target: Alpine Linux x86-64 (tinkerpad / ThinkPad T480)
# ---------------------------------------------------------------------------
# Top-level orchestrator. Runs Tier 0 → 1 → 2 in sequence.
# Stops if any tier exits non-zero. One confirmation prompt for all tiers.
# ---------------------------------------------------------------------------
SCRIPT_NAME="ce-install"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "${SCRIPT_DIR}/lib/ce-common.sh" \
|| { echo "ERROR: lib/ce-common.sh not found"; exit 1; }
check_not_root
TIERS_COMPLETED=()
TIERS_FAILED=()
print_final_summary() {
log_info "=== FULL INSTALL SUMMARY ==="
log_info "Completed: ${TIERS_COMPLETED[*]:-none}"
if [[ ${#TIERS_FAILED[@]} -gt 0 ]]; then
log_warn "Failed: ${TIERS_FAILED[*]}"
fi
log_info "Full log: ${LOG_FILE}"
log_info "Per-tier logs: ${LOG_DIR}/ce-base-*.log, ce-minimal-*.log, ce-basic-*.log"
}
run_tier() {
local name="${1}" script="${2}"
log_info "--- Starting ${name} ---"
if CE_INSTALL_NO_CONFIRM=1 bash "${script}"; then
TIERS_COMPLETED+=("${name}")
log_info "--- ${name} complete ---"
else
TIERS_FAILED+=("${name}")
log_error "--- ${name} FAILED — stopping ---"
print_final_summary
exit 1
fi
}
log_info "=== CE OS INSTALLER — FULL STACK ==="
log_info "Arch: ${ARCH} | Log: ${LOG_FILE}"
log_info ""
log_info " Tier 0 — Base : prerequisites, SSH, doas"
log_info " Tier 1 — Minimal : full TUI workstation"
log_info " Tier 2 — Basic : daily-use additions + GUI"
log_info ""
confirm_proceed
run_tier "Tier 0 — Base" "${SCRIPT_DIR}/ce-base.sh"
run_tier "Tier 1 — Minimal" "${SCRIPT_DIR}/ce-minimal.sh"
run_tier "Tier 2 — Basic" "${SCRIPT_DIR}/ce-basic.sh"
print_final_summary
log_info "=== INSTALL COMPLETE ==="