testsAndMisc/linux_configuration/scripts/single_use/utils/lib
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
..
analyze_repo_report.sh Split analyze_repo.sh into an entry script and five libs 2026-08-16 21:47:03 +02:00
analyze_repo_scan.sh Split analyze_repo.sh into an entry script and five libs 2026-08-16 21:47:03 +02:00
analyze_repo_separate.sh Split analyze_repo.sh into an entry script and five libs 2026-08-16 21:47:03 +02:00
analyze_repo_symbols.sh Split analyze_repo.sh into an entry script and five libs 2026-08-16 21:47:03 +02:00
analyze_repo_tools.sh Split analyze_repo.sh into an entry script and five libs 2026-08-16 21:47:03 +02:00
android_commands.sh Split update_android_hosts.sh; extract its blocklist as data 2026-08-16 21:23:39 +02:00
android_device.sh Split update_android_hosts.sh; extract its blocklist as data 2026-08-16 21:23:39 +02:00
android_module.sh Split update_android_hosts.sh; extract its blocklist as data 2026-08-16 21:23:39 +02:00
bl9000_backup.sh Split three more linux_configuration giants 2026-08-16 19:43:55 +02:00
bl9000_deps.sh Split three more linux_configuration giants 2026-08-16 19:43:55 +02:00
bl9000_device.sh Split three more linux_configuration giants 2026-08-16 19:43:55 +02:00
bl9000_magisk.sh Split three more linux_configuration giants 2026-08-16 19:43:55 +02:00
bl9000_mtkclient.sh Split three more linux_configuration giants 2026-08-16 19:43:55 +02:00
bl9000_usage.sh Split three more linux_configuration giants 2026-08-16 19:43:55 +02:00
docs_all.sh Split three more linux_configuration giants 2026-08-16 19:43:55 +02:00
docs_cpp.sh Split three more linux_configuration giants 2026-08-16 19:43:55 +02:00
docs_js.sh Split three more linux_configuration giants 2026-08-16 19:43:55 +02:00
docs_python_keywords.sh Split three more linux_configuration giants 2026-08-16 19:43:55 +02:00
docs_python.sh Split three more linux_configuration giants 2026-08-16 19:43:55 +02:00
docs_rust.sh Split three more linux_configuration giants 2026-08-16 19:43:55 +02:00
download_classify.sh Split three large linux_configuration scripts, defer a fourth 2026-08-16 19:06:16 +02:00
download_media.sh Split three large linux_configuration scripts, defer a fourth 2026-08-16 19:06:16 +02:00
download_sizes.sh Split three large linux_configuration scripts, defer a fourth 2026-08-16 19:06:16 +02:00
exercism_config.sh Split seven more linux_configuration scripts 2026-08-16 18:56:05 +02:00
idle_inhibit.sh Split three near-miss linux_configuration scripts 2026-08-16 18:38:43 +02:00
offline_cpp.sh Split offline docs and arch optimiser; defer libre_translate 2026-08-16 20:09:54 +02:00
offline_index.sh Split offline docs and arch optimiser; defer libre_translate 2026-08-16 20:09:54 +02:00
offline_js.sh Split offline docs and arch optimiser; defer libre_translate 2026-08-16 20:09:54 +02:00
offline_python.sh Split offline docs and arch optimiser; defer libre_translate 2026-08-16 20:09:54 +02:00
offline_rust.sh Split offline docs and arch optimiser; defer libre_translate 2026-08-16 20:09:54 +02:00
offline_status.sh Split offline docs and arch optimiser; defer libre_translate 2026-08-16 20:09:54 +02:00
repo_study_steps.sh Split five more linux_configuration single_use scripts 2026-08-16 18:51:28 +02:00
sd_card_ops.sh Split seven more linux_configuration scripts 2026-08-16 18:56:05 +02:00