aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-04-13 00:16:04 -0400
committerCraig Jennings <c@cjennings.net>2026-04-13 00:16:04 -0400
commita15a92cf36d2460784587b3fa6f586e94e9ff6ab (patch)
tree26d6156eb137ed0c8943dcbfc0327d40650ee66c /Makefile
parent0f4fbe00108c811da20e802290d9d50fc8daff4d (diff)
downloadarchangel-a15a92cf36d2460784587b3fa6f586e94e9ff6ab.tar.gz
archangel-a15a92cf36d2460784587b3fa6f586e94e9ff6ab.zip
refactor: decompose install_btrfs into named orchestration stages
Pull the single-vs-multi-disk and LUKS-vs-no-encryption branching out of install_btrfs() into five helpers in lib/btrfs.sh: - btrfs_open_encryption — LUKS open + fill devices array - btrfs_make_filesystem — create_btrfs_volume dispatch - btrfs_configure_luks_target — in-chroot LUKS config - btrfs_install_grub — GRUB primary + multi-disk mirror - btrfs_close_encryption — LUKS close (cleanup) Helpers use namerefs (local -n) to take the caller's arrays as locals instead of promoting them to globals. install_btrfs() drops from ~99 lines of nested if-then-else to a ~45-line flat sequence of named stages — matching the style of install_zfs(). Behavior preserved — this is pure code movement, no new disk/LUKS operations. No unit tests added for the new helpers: they all wrap real LUKS/mkfs.btrfs calls that need block devices and root; VM integration tests in scripts/test-install.sh remain the source of truth. .shellcheckrc: disable SC2178 (nameref array heuristic) and SC2153 (globals from sourced files) — both recurring false positives. make test: 65/65. shellcheck clean.
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions