🌱 rc-expand.sh
Purpose
- Read
rotkeeper-bom.yamlto identify tomb sections and asset patterns. - Generate initial Markdown files and directory structures for each section.
- Populate frontmatter and stub headers for future content.
CLI Interface
rc-expand.sh [--dry-run] [--verbose] [--help]Supported options: - --help, -h Show
usage information and exit. - --dry-run Preview actions
without writing stubs. - --verbose Show detailed
logs.
Workflow Steps
- Parse Flags & Setup: Handle
--dry-run,--verbose,--help. - Determine BOM Path: Resolve
rotkeeper-bom.yamlrelative to script. - Generate Stubs: Create directories and markdown files with frontmatter.
- Copy Scripts & Resources: Replicate scripts, configs, templates.
- Finalize: Copy BOM for future runs and log completion.
Exit Codes
0— Stubs generated successfully.1— BOM file not found or parse error.2— I/O error during directory or file creation.
Examples
# Default expansion
./bones/scripts/rc-expand.sh
# Preview expansion without changes
./bones/scripts/rc-expand.sh --dry-run
# Verbose expansion with detailed logs
./bones/scripts/rc-expand.sh --verbose
# Show help
./bones/scripts/rc-expand.sh --help