ceos-alpine-installer/bootstrap.sh
John A. Hoeven e1ee30812f Fix first real-hardware install issues from tinkerpad run
- bootstrap: install bash before fetch (ash-only base installs)
- bootstrap/deploy: correct URL (drop /repo prefix, webroot is /srv/repo)
- 01_core: remove bash (bootstrap now handles it)
- ce-base/minimal/basic: BusyBox-compatible df check (drop --output=avail)
- ce-common: add ensure_testing_repo + install_pkg_testing
- 12_access: espeakup + espeakup-openrc from edge/testing
- 05_fonts: nerd-fonts → nerd-fonts-all (meta-package blocks by design)
- 06_utils: tealdeer + bash-completion from edge/testing
- 07_journal: jrnl test checks ~/.local/bin/jrnl (pipx not in PATH during install)
- 11_wiki: arch-aware CE_REPO (${ARCH} replaces hardcoded amd64); Forgejo TODO updated

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 21:55:21 +02:00

93 lines
2.9 KiB
Bash

#!/usr/bin/env bash
# Created by John A. Hoeven with the ethical assistance of Claude AI
# ---------------------------------------------------------------------------
# bootstrap.sh
# Served at: http://192.168.0.138/scripts/alpine-ceos-installer/bootstrap.sh
# Version: v0.0.1 | Status: DEVELOPMENT
# Target: Alpine Linux x86-64 (tinkerpad / ThinkPad T480)
# ---------------------------------------------------------------------------
# Run this on tinkerpad to download the full CE OS installer from workbench.
# Usage: wget http://192.168.0.138/scripts/alpine-ceos-installer/bootstrap.sh
# bash bootstrap.sh
#
# TODO — Forgejo: replace the wget block below with these three lines and delete the rest of this file:
# doas apk add git
# git clone -b dev https://git.jhoeven.net/giovannino/ceos-alpine-installer.git
# cd ceos-alpine-installer && bash ce-install.sh
# ---------------------------------------------------------------------------
BASE="http://192.168.0.138/scripts/alpine-ceos-installer"
DEST="/tmp/ceos-installer-$(date +%Y%m%d%H%M%S)"
echo "CE OS Alpine Installer — Bootstrap"
echo "==================================="
echo "Source: ${BASE}"
echo "Dest: ${DEST}"
echo ""
if ! command -v bash > /dev/null 2>&1; then
echo "Installing bash..."
doas apk add bash || { echo "ERROR: could not install bash"; exit 1; }
fi
mkdir -p \
"${DEST}/lib/base" \
"${DEST}/lib/minimal" \
"${DEST}/lib/basic" \
"${DEST}/tests"
fetch() {
local path="${1}"
if wget -q -O "${DEST}/${path}" "${BASE}/${path}"; then
echo " OK ${path}"
else
echo " ERR ${path}" >&2
echo "Bootstrap failed: could not fetch ${path}" >&2
exit 1
fi
}
echo "Fetching orchestrators..."
fetch "ce-install.sh"
fetch "ce-base.sh"
fetch "ce-minimal.sh"
fetch "ce-basic.sh"
echo "Fetching library..."
fetch "lib/ce-common.sh"
fetch "lib/base/01_core.sh"
fetch "lib/base/02_doas.sh"
echo "Fetching Tier 1 — Minimal..."
for n in 01_shell 02_terminal 03_files 04_vcs 05_systools \
06_comms 07_journal 08_web 09_network 10_record \
11_wiki 12_access; do
fetch "lib/minimal/${n}.sh"
done
echo "Fetching Tier 2 — Basic..."
for n in 01_comms 02_monitor 03_gui 04_media 05_fonts 06_utils; do
fetch "lib/basic/${n}.sh"
done
echo "Fetching tests..."
for t in test_base test_minimal test_basic; do
fetch "tests/${t}.sh"
done
find "${DEST}" -name "*.sh" -exec chmod +x {} \;
echo ""
echo "Bootstrap complete."
echo ""
echo "To install:"
echo " cd ${DEST}"
echo " bash ce-install.sh # full stack (Tier 0 + 1 + 2)"
echo " bash ce-base.sh # Tier 0 only"
echo " bash ce-minimal.sh # Tier 1 only (requires Tier 0)"
echo " bash ce-basic.sh # Tier 2 only (requires Tier 1)"
echo ""
echo "To run tests after install:"
echo " bash ${DEST}/tests/test_base.sh"
echo " bash ${DEST}/tests/test_minimal.sh"
echo " bash ${DEST}/tests/test_basic.sh"