testsAndMisc/linux_configuration/scripts/periodic_background/digital_wellbeing/lib
Krzysztof kuhy Rudnicki f5edebae4a block_compulsive_opening: split into lib/ under the 250-line cap
705 -> 182 lines, with state, the launch gate, install/uninstall and
reporting moved into cco_state.sh, cco_wrapper.sh, cco_install.sh and
cco_report.sh.

The entry script keeps its exact deployed path and stays a real file
there, not a symlink: the app wrappers already installed on disk
hard-code /usr/local/bin/block-compulsive-opening.sh, and the pacman
hook invokes it. _CCO_LIB_DIR probes for lib/ beside the script and
falls back to the script's own directory, so the repo tree and the flat
/usr/local/bin deploy layout both work; both branches were exercised.

install_all deploys the libs and uninstall_all removes them in this same
commit, so there is never a deployed copy that is split but missing its
libs -- the failure that had to be repaired for install_leechblock.

The libs deploy flat into /usr/local/bin rather than into
/usr/local/share/digital_wellbeing/lib, because install_leechblock_payload
does an rm -rf mirror of that directory and would delete them.

Verified beyond the usual gates: a line-multiset check reports zero
missing functional lines, and all three heredoc bodies -- the generated
app wrapper, the generated pacman hook and the help text -- are
byte-identical, which verify_shell_split.sh cannot check. status output
matches the still-monolithic deployed copy byte for byte.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-21 15:51:06 +02:00
..
tests install_leechblock: first test suite for the split libs 2026-08-21 15:39:15 +02:00
cco_install.sh block_compulsive_opening: split into lib/ under the 250-line cap 2026-08-21 15:51:06 +02:00
cco_report.sh block_compulsive_opening: split into lib/ under the 250-line cap 2026-08-21 15:51:06 +02:00
cco_state.sh block_compulsive_opening: split into lib/ under the 250-line cap 2026-08-21 15:51:06 +02:00
cco_wrapper.sh block_compulsive_opening: split into lib/ under the 250-line cap 2026-08-21 15:51:06 +02:00
leechblock_browsers.sh install_leechblock: first test suite for the split libs 2026-08-21 15:39:15 +02:00
leechblock_config.sh install_leechblock: split into lib/ under the 250-line cap 2026-08-21 15:32:48 +02:00
leechblock_fetch.sh install_leechblock: split into lib/ under the 250-line cap 2026-08-21 15:32:48 +02:00
leechblock_firefox.sh install_leechblock: split into lib/ under the 250-line cap 2026-08-21 15:32:48 +02:00
music_detect.sh Split music_parallelism.sh into an entry script and three libs 2026-08-16 21:50:34 +02:00
music_monitor.sh Split music_parallelism.sh into an entry script and three libs 2026-08-16 21:50:34 +02:00
music_status.sh Split music_parallelism.sh into an entry script and three libs 2026-08-16 21:50:34 +02:00