testsAndMisc/linux_configuration/scripts/single_use
Krzysztof kuhy Rudnicki 41cc0451c9 Split analyze_repo.sh into an entry script and five libs
869 lines -> 231, with the extracted helpers and per-STEP blocks in
lib/analyze_repo_{scan,tools,separate,report,symbols}.sh (86-228 each).

The seam that mattered was STEP 4, whose two passes share a map of
language -> temp file. Rather than let that cross a file boundary, the
map is passed by nameref and the comments file by parameter, so
separate_code_and_comments fills what report_languages reads with no
global in between.

Two boundaries were one step off on the first pass and produced 23
shellcheck findings: the KEYWORDS_* tables and detect_languages had been
cut away from their only consumers, so every one read as unused (SC2034)
or unassigned (SC2154). Moving each beside its consumer cleared all 23
without a suppression. The nameref also makes shellcheck read a bare
assoc-array subscript on the left of an assignment as arithmetic;
quoting the nine keys is the fix.

The line-set diff against HEAD earned its place here: it caught a
`find ... -printf` call at original line 719 that had fallen into a
one-line gap between two extraction ranges and been dropped. bash -n and
shellcheck both passed on that broken version.

Verified without running the script (decision 6 -- install_missing_tools
calls sudo pacman, cargo and makepkg): shellcheck clean across all six,
the function set matches HEAD plus exactly the six new wrappers, no
executable line lost, and a stubbed run of the entry preamble defines
all fourteen functions, proving the source lines resolve at runtime.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY
2026-08-16 21:47:03 +02:00
..
features Split setup_dns_blocker.sh, a live systemd unit target 2026-08-16 21:31:03 +02:00
feedback-appimage feedback: local-only pacman package build, and ignore build artifacts 2026-08-10 15:33:18 +02:00
fixes Split offline docs and arch optimiser; defer libre_translate 2026-08-16 20:09:54 +02:00
fresh-install Add install_core_system.sh; remove pc_startup and thesis_tracker 2026-05-15 01:13:28 +02:00
lib Split install_joplin.sh and establish the shell-split pattern 2026-08-16 18:33:59 +02:00
misc/testsAndMisc-bash Split three more scripts; make the verifier catch heredoc cuts 2026-08-16 20:16:08 +02:00
utils Split analyze_repo.sh into an entry script and five libs 2026-08-16 21:47:03 +02:00
install_code_insiders.sh refactor(linux_configuration/scripts): split all scripts into single_use/ and periodic_background/ 2026-05-15 00:32:35 +02:00
install_feedback.sh feedback: local-only pacman package build, and ignore build artifacts 2026-08-10 15:33:18 +02:00
install_joplin.sh Split install_joplin.sh and establish the shell-split pattern 2026-08-16 18:33:59 +02:00
install_ungoogled_chromium_ubuntu.sh Wire uBlock Origin into every real Chromium launch, alongside LeechBlock 2026-08-12 22:44:28 +02:00
setup_thorium_startup.sh refactor(linux_configuration/scripts): split all scripts into single_use/ and periodic_background/ 2026-05-15 00:32:35 +02:00
test_bad.sh refactor(linux_configuration/scripts): split all scripts into single_use/ and periodic_background/ 2026-05-15 00:32:35 +02:00
test_removal.sh refactor(linux_configuration/scripts): split all scripts into single_use/ and periodic_background/ 2026-05-15 00:32:35 +02:00