testsAndMisc/linux_configuration/scripts/single_use/utils
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
..
data Split update_android_hosts.sh; extract its blocklist as data 2026-08-16 21:23:39 +02:00
lib Split analyze_repo.sh into an entry script and five libs 2026-08-16 21:47:03 +02:00
analyze_repo.sh Split analyze_repo.sh into an entry script and five libs 2026-08-16 21:47:03 +02:00
check_brother_printer.sh refactor(linux_configuration/scripts): split all scripts into single_use/ and periodic_background/ 2026-05-15 00:32:35 +02:00
convert_video.sh refactor(linux_configuration/scripts): split all scripts into single_use/ and periodic_background/ 2026-05-15 00:32:35 +02:00
convert_words.sh refactor(linux_configuration/scripts): split all scripts into single_use/ and periodic_background/ 2026-05-15 00:32:35 +02:00
docx_to_pdf.sh refactor(linux_configuration/scripts): split all scripts into single_use/ and periodic_background/ 2026-05-15 00:32:35 +02:00
download_exercism_bulk.sh Fail the build on any shellcheck finding; fix the 222 the old gate hid 2026-08-03 19:49:11 +02:00
download_nltk_data.py Gate the no-inline-Python rule instead of asking people to remember it 2026-08-16 15:11:56 +02:00
fast_count.py refactor: extract all inline Python from shell scripts into proper .py files 2026-06-06 10:31:48 +02:00
find_keepassxc.sh refactor(linux_configuration/scripts): split all scripts into single_use/ and periodic_background/ 2026-05-15 00:32:35 +02:00
format_sd_card.sh Split seven more linux_configuration scripts 2026-08-16 18:56:05 +02:00
generate_study_materials.sh Fail the build on any shellcheck finding; fix the 222 the old gate hid 2026-08-03 19:49:11 +02:00
gif_to_square.sh Fix the 11 shellcheck findings that kept CI red since b83ce5d 2026-08-04 20:55:02 +02:00
image_to_resolution.sh refactor(linux_configuration/scripts): split all scripts into single_use/ and periodic_background/ 2026-05-15 00:32:35 +02:00
install_exercism.sh Split seven more linux_configuration scripts 2026-08-16 18:56:05 +02:00
install_offline_docs.sh refactor(linux_configuration/scripts): split all scripts into single_use/ and periodic_background/ 2026-05-15 00:32:35 +02:00
install_plagiarism_tools.sh Gate the no-inline-Python rule instead of asking people to remember it 2026-08-16 15:11:56 +02:00
lookup_docs.sh Split three more linux_configuration giants 2026-08-16 19:43:55 +02:00
organize_downloads.sh Split three large linux_configuration scripts, defer a fourth 2026-08-16 19:06:16 +02:00
pdf_to_image.sh refactor(linux_configuration/scripts): split all scripts into single_use/ and periodic_background/ 2026-05-15 00:32:35 +02:00
repo_to_study.sh Split five more linux_configuration single_use scripts 2026-08-16 18:51:28 +02:00
root_bl9000.sh Split three more linux_configuration giants 2026-08-16 19:43:55 +02:00
setup_android_adblock.sh refactor(linux_configuration/scripts): split all scripts into single_use/ and periodic_background/ 2026-05-15 00:32:35 +02:00
setup_media_organizer.sh refactor(linux_configuration/scripts): split all scripts into single_use/ and periodic_background/ 2026-05-15 00:32:35 +02:00
setup_offline_docs.sh Split offline docs and arch optimiser; defer libre_translate 2026-08-16 20:09:54 +02:00
setup_passwordless_system.sh refactor(linux_configuration/scripts): split all scripts into single_use/ and periodic_background/ 2026-05-15 00:32:35 +02:00
sort_downloads.sh refactor(linux_configuration/scripts): split all scripts into single_use/ and periodic_background/ 2026-05-15 00:32:35 +02:00
steam_compatibility.sh refactor(linux_configuration/scripts): split all scripts into single_use/ and periodic_background/ 2026-05-15 00:32:35 +02:00
sync_keepassxc.sh refactor(linux_configuration/scripts): split all scripts into single_use/ and periodic_background/ 2026-05-15 00:32:35 +02:00
to_mp4.sh refactor(linux_configuration/scripts): split all scripts into single_use/ and periodic_background/ 2026-05-15 00:32:35 +02:00
to_webm.sh refactor(linux_configuration/scripts): split all scripts into single_use/ and periodic_background/ 2026-05-15 00:32:35 +02:00
toggle_mic.sh refactor(linux_configuration/scripts): split all scripts into single_use/ and periodic_background/ 2026-05-15 00:32:35 +02:00
toggle_wheel.sh refactor(linux_configuration/scripts): split all scripts into single_use/ and periodic_background/ 2026-05-15 00:32:35 +02:00
toggle_window_manager.sh refactor(linux_configuration/scripts): split all scripts into single_use/ and periodic_background/ 2026-05-15 00:32:35 +02:00
turn_off_auto_idle_screen_shutdown.sh Split three near-miss linux_configuration scripts 2026-08-16 18:38:43 +02:00
txt_to_image.sh Fix the 11 shellcheck findings that kept CI red since b83ce5d 2026-08-04 20:55:02 +02:00
update_android_hosts.sh Split update_android_hosts.sh; extract its blocklist as data 2026-08-16 21:23:39 +02:00
upgrade.sh Fail the build on any shellcheck finding; fix the 222 the old gate hid 2026-08-03 19:49:11 +02:00
volume_control.sh feat: split oversized modules for 500-line limit, fix kasa coverage gap 2026-06-14 07:19:37 +02:00