summaryrefslogtreecommitdiff
path: root/src/lib/bootstrap.source.sh
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-06-17 21:45:40 +0300
committerPaul Buetow <paul@buetow.org>2026-06-17 21:45:40 +0300
commiteb8cbbbcb9a613757ac4440246c43ebba6758afe (patch)
tree08ecc67cbc3d265d1e0379ba965017c06ca3a790 /src/lib/bootstrap.source.sh
parent25aff490d739290602b28bdc53936dd3ea6ed939 (diff)
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.<basename>.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 <noreply@anthropic.com>
Diffstat (limited to 'src/lib/bootstrap.source.sh')
-rw-r--r--src/lib/bootstrap.source.sh1
1 files changed, 1 insertions, 0 deletions
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