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 /README.md | |
| 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 'README.md')
| -rw-r--r-- | README.md | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -64,7 +64,9 @@ shuriken --version * `--print-config` loads the config and overrides, validates basic config values, and prints the effective configuration without writing output, running ImageMagick, running tar, cleaning, or initializing. -* `--clean` removes the configured output directory. +* `--clean` removes the configured output directory and any leftover + `.shuriken.*.staging`/`.backup` directories the generation pipeline created as + siblings of `DIST_DIR` (e.g. from an interrupted run). * `--version` prints the program version. * `--config PATH` selects the config file for `--generate`, `--refresh-splash`, `--dry-run`, `--print-config`, or `--clean`. @@ -128,8 +130,9 @@ output (it is never written into `DIST_DIR`, so `--sync` does not deploy it), an persists across runs even if `DIST_DIR` is removed or rebuilt. Because reading EXIF from full-size originals is the slowest part of generation, keeping this cache makes regenerating an album dramatically faster: an unchanged photo skips -`identify` entirely. `--clean` removes `DIST_DIR` but leaves `cache/` in place; -delete `cache/` by hand to force a full EXIF rebuild on the next run. +`identify` entirely. `--clean` removes `DIST_DIR` (and any leftover staging +directories) but leaves `cache/` in place; delete `cache/` by hand to force a +full EXIF rebuild on the next run. Pass `--force` with `--generate` to rebuild all generated image artifacts and re-read every photo's EXIF from scratch (it clears `cache/` once up front, then |
