mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-11 17:14:08 +01:00
raspberry_pi_nextcloud.sh 1276 -> 163, root_bl9000.sh 1116 -> 211, lookup_docs.sh 942 -> 165. Sixteen new libs. lookup_python was one 300-line function; its keyword-to-anchor mapping became python_keyword_doc, emitting result and desc tab-separated so the caller keeps its control flow. bl9000_mtkclient had cd X; work; cd - with three return paths. install_mtkclient became a subshell; extract_boot_with_mtkclient could not, since it exports BOOT_IMG - so the venv check moved before the cd, the cd is guarded, and the restores use a saved $PWD. Four more unguarded cd calls fixed, and a third instance of the lib chaining bug flattened. lookup_docs.sh had no SCRIPT_DIR at all. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY
19 lines
1.4 KiB
JSON
19 lines
1.4 KiB
JSON
{
|
|
"title": "Split three more very large linux_configuration scripts",
|
|
"objective": "Bring raspberry_pi_nextcloud.sh (1276), root_bl9000.sh (1116) and lookup_docs.sh (942) under the 250-line cap, fixing the cd handling the splits expose rather than suppressing it.",
|
|
"acceptance_criteria": [
|
|
"All three entry scripts and all sixteen new libs are at most 250 lines.",
|
|
"The pre-commit shellcheck hook passes on every touched file, with no new suppression and no disable directive.",
|
|
"No lib sources a sibling: each entry script sources every lib directly, in dependency order.",
|
|
"The stubbed run reports every moved function as defined, for all three scripts.",
|
|
"Every SC2164 and SC2103 the split exposes is fixed at the source. Where a function exports a variable to its caller it must not become a subshell; guard the cd and restore the previous directory instead.",
|
|
"No script is executed. These flash SD cards, root a phone over USB and configure a web server."
|
|
],
|
|
"out_of_scope": [
|
|
"Executing any flash, root or configure step.",
|
|
"check_and_enable_services.sh and the other deferred scripts, whose seams cross shared mutable state.",
|
|
"Changing what any script does when run, beyond the cd guards."
|
|
],
|
|
"verifier": "meta/scripts/verify_shell_split.sh per script, plus shellcheck over every lib in isolation, plus a grep confirming no lib sources a sibling, plus pre-commit run --files and check_file_length.sh."
|
|
}
|