Skip to main content
Settings
Search
Appearance
Theme Mode
About
Jekyll v3.10.0
Environment Production
Last Build
2026-04-21 05:41 UTC
Current Environment Production
Build Time Apr 21, 05:41
Jekyll v3.10.0
Build env (JEKYLL_ENV) production
Page Location
Page Info
Layout root
Collection none
Path scripts/lib/install/README.md
URL /scripts/lib/install/
Theme Skin
SVG Backgrounds
Layer Opacity
0.6
0.04
0.08

scripts/lib/install/ — Installer Library Modules

Focused modules sourced by install.sh at the repository root. Each module is self-contained and ≤ 200 lines for readability and reuse.

Modules

File Purpose Key Functions
logging.sh log_info / log_success / log_warning / log_error shim used throughout install.sh. log_info, log_success, log_warning, log_error
platform.sh OS, Ruby version, and platform detection (bash 3.2-compatible). detect_os, detect_ruby_version, ruby_version_lt_27, needs_macos_gemfile, detect_platform
fs.sh Idempotent file/directory copy with timestamped backups. copy_file_with_backup, copy_directory_with_backup
template.sh `` placeholder substitution + local/remote/fallback resolution. render_template, create_from_template, templates_available
config.sh Loads templates/config/install.conf with hard-coded defaults as fallback. load_install_config
pages.sh Manifest-driven starter-page renderer. Replaces 8 legacy create_*_page heredoc functions with one driver. render_starter_pages, render_admin_settings_pages (+ create_starter_pages/create_admin_pages aliases)
profile.sh Pure-bash YAML reader for templates/profiles/*.yml. Bash 3.2 compatible (no yq/python). list_profile_names, profile_path, profile_get_scalar, profile_get_list, profile_print_summary
deploy/ Pluggable deployment-target modules (github-pages, azure-swa, docker-prod) with a uniform check_prereqs/install/verify/doc_url contract. deploy_run_target, deploy_print_summary, deploy_render, deploy_copy (see deploy/README.md)

Loading

install.sh sources these modules when scripts/lib/install/ is present. When it isn’t (a stripped distribution or a curl | bash one-liner that didn’t bundle the libraries), install.sh falls back to inlined copies of the same functions defined at the top of the script.

CLI Entrypoint

For day-to-day use prefer the canonical dispatcher:

./scripts/bin/install help            # subcommand index
./scripts/bin/install init            # full install in CWD
./scripts/bin/install init --profile minimal /tmp/demo
./scripts/bin/install list-profiles   # available profiles
./scripts/bin/install list-targets    # available deploy targets
./scripts/bin/install deploy github-pages /tmp/demo
./scripts/bin/install deploy azure-swa,docker-prod /tmp/demo
./scripts/bin/install agents          # AGENTS.md / instructions index
./scripts/bin/install version         # theme version from version.rb

init translates --profile into the appropriate legacy flag and execs install.sh. deploy dispatches to the modules under deploy/ (Phase 4). The remaining subcommands (wizard, diagnose, doctor, upgrade) are stubs that print a clear notice until their backing modules land in Phases 5-6.

Roadmap

Phases 1, 1.5, 2, 3 (declarative profiles), and 4 (deploy modules) are complete. Future phases will add:

See the session refactor plan for the full sequence.

Compatibility

All modules target bash 3.2 (the macOS default /bin/bash). No declare -A, no =~ capture groups, no mapfile/readarray.

Conventions


Last updated: 2026-04-20 — Phase 4 (deploy/registry.sh + deploy/{github-pages,azure-swa,docker-prod}.sh + templates/deploy/).