No description
Add proper cleanup handling using bash trap to ensure test artifacts are removed regardless of how the test script exits. Changes: - Add cleanup() function to remove all test artifacts - Set trap to call cleanup on EXIT (success, failure, or interruption) - Remove redundant manual cleanup since trap handles it automatically - Add error suppression to prevent cleanup failures This fixes the defect where test artifacts would remain if a test failed or the script was interrupted before reaching the manual cleanup section. |
||
---|---|---|
archiver | ||
collector | ||
CLAUDE.md | ||
go.mod | ||
main.go | ||
plan.md | ||
README.md | ||
test.sh |
collect
CLI tool that collects files recursively matching specific names, maintains their file structure, and adds them to an archive for backup.
Examples
Finds all files named .mise.toml
collect --name .mise.toml ./ backup.tgz
Finds all files nested in a directory that glob matches aet-* (ie. aet-bin)
collect --match aet-*/ ./ backup.zip