🖼️ rc-assets.sh
Script Path:
bones/scripts/rc-assets.sh
Purpose
- Scan rendered HTML in
output/for<img>or<link>tags referencingassets/ - Identify actual files used in the tomb pages
- Copy matched assets from
home/assets/intooutput/assets/ - Emit a YAML manifest of the matched files to
bones/asset-manifest.yaml
CLI Interface
rc-assets.sh [--dry-run] [--verbose] [--help]Supported flags: - --help, -h Show usage
information and exit. - --dry-run Preview actions without
writing output. - --verbose Show detailed logs.
Workflow Steps
- Verify Dependencies:
check_deps find sha256sum yq. - Discover Assets: Locate referenced assets in output/*.html
- Compute Metadata: For each referenced asset, compute SHA256 and copy into output/assets/
- Assemble & Write Manifest: Structure and
write to
bones/asset-manifest.yamlor preview under dry-run.
Exit Codes
0— Manifest generated successfully.1— Dependencies missing or I/O error.2— Critical error (e.g. missing inputs)
Examples
# Generate full manifest
./bones/scripts/rc-assets.sh
# Preview without writing
./bones/scripts/rc-assets.sh --dry-run --verbose
# Show help
./bones/scripts/rc-assets.sh --helpManifest Format
The output manifest is a YAML file with entries like:
- path: "images/rotkeeper-splash.png"
sha256: "abc123..."If no assets are found, an empty manifest with
assets: [] is written.