Template
[#797] vendor bash3boilerplate (MIT) as house standard for new operational scripts
main.sh engine + example.sh demo + adoption policy (new scripts start from b3bp; existing retrofit opportunistically on touch; vendored copy pruned from shellcheck scan — upstream code, not house-audited). Founder directive 2026-09-05. https://projects.knownelement.com/issues/797
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
# bash3boilerplate (b3bp) — house standard for new operational shell scripts
|
||||
|
||||
Vendored 2026-09-05 from https://github.com/kvz/bash3boilerplate (MIT,
|
||||
attribution headers retained in main.sh/example.sh) per founder directive.
|
||||
|
||||
## Adoption policy
|
||||
|
||||
- **New operational scripts** in fleet repos should start from
|
||||
`example.sh` (copy, rename, prune) — it gives: strict mode
|
||||
(errexit/errtrace/nounset/pipefail), usage-heredoc-driven CLI parsing,
|
||||
severity-leveled STDERR logging (LOG_LEVEL + NO_COLOR), safe magic
|
||||
variables (`__dir`, `__file`).
|
||||
- **Existing scripts**: retrofit opportunistically when touched; do not
|
||||
churn working scripts solely to adopt b3bp.
|
||||
- House enforcement (check-rules.sh: shellcheck, secret scan, ticket gate)
|
||||
continues to apply on top — b3bp does not replace it.
|
||||
|
||||
## Files
|
||||
|
||||
- `main.sh` — the b3bp engine; source it from your script (see example.sh)
|
||||
- `example.sh` — full-pattern demonstration
|
||||
Reference in New Issue
Block a user