mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-10 23:27:01 +01:00
329 -> 230 + 124. The colour constants, human_readable, dir_size_kb, report, confirm and try_clean move to lib/disk_cleanup_common.sh, along with the report-only loop and the summary block as print_report_only and print_summary. The seam passes state -- report accumulates into TOTAL_RECLAIMABLE and confirm reads CLEAN -- so both are set before the source line, and the verification is a trace diff rather than a static check: identical exit status, identical ordered du calls, identical stdout and stderr against a detached worktree at the pre-split commit. Also ran it for real from /tmp (not its own directory) to confirm SCRIPT_DIR resolves the lib from any cwd: 303.7 GB reported reclaimable, nothing deleted. The one shellcheck finding (SC2034 on RED) was fixed by moving the function that uses it, not suppressed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY |
||
|---|---|---|
| .. | ||
| disk_cleanup_common.sh | ||