diff options
| author | Paul Buetow <paul@buetow.org> | 2026-06-17 21:45:40 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-06-17 21:45:40 +0300 |
| commit | eb8cbbbcb9a613757ac4440246c43ebba6758afe (patch) | |
| tree | 08ecc67cbc3d265d1e0379ba965017c06ca3a790 /src/lib/bootstrap.source.sh | |
| parent | 25aff490d739290602b28bdc53936dd3ea6ed939 (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.sh | 1 |
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 |
