From eb8cbbbcb9a613757ac4440246c43ebba6758afe Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Wed, 17 Jun 2026 21:45:40 +0300 Subject: ln0 make --clean remove leftover staging directories The --clean action deleted DIST_DIR but left behind the staging/backup directories the generation pipeline creates as siblings of DIST_DIR (.shuriken..staging.* / .backup.*). Users expect --clean to remove all generation output, so extend it to also delete those. Cleanup runs after the validate_clean_dist_dir safety guard (8n0), so a dangerous DIST_DIR still aborts before any deletion. It only matches shuriken's own basename-specific staging/backup prefixes (the exact mktemp templates from config.staging.source.sh), uses nullglob so a missing match never expands to a literal pattern, and only removes directories. Unrelated dotfiles in the parent are never touched. Update test_clean to assert the staging/backup dirs are removed while unrelated entries survive, and document the behavior in the CLI usage text and README. Co-Authored-By: Claude Opus 4.8 --- src/lib/bootstrap.source.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'src/lib/bootstrap.source.sh') diff --git a/src/lib/bootstrap.source.sh b/src/lib/bootstrap.source.sh index 52c0599..43cef59 100644 --- a/src/lib/bootstrap.source.sh +++ b/src/lib/bootstrap.source.sh @@ -14,6 +14,7 @@ usage() { $0 --dry-run [--config PATH] [OPTIONS] $0 --print-config [--config PATH] [OPTIONS] $0 --clean [--config PATH] [OPTIONS] + (removes DIST_DIR and any leftover .shuriken.*.staging/backup dirs) $0 --version $0 --init -- cgit v1.2.3