Building a macOS Dev Workstation Toolkit in Bash
Описание и применение
Тут описан набор Bash‑утилит для управления macOS‑рабочим столом с тестами, CI и проверяемыми резервными копиями.
Задача
Workstation scripts rot because they lack tests, documentation, and consistent configuration, leading to duplicated logic, scattered settings, and silent regressions.
Результат
The toolkit provides a single, test‑driven, documented, and verifiable workflow for macOS workstation setup, reducing script rot and ensuring reliable backups.
Рабочий процесс
- Clone the repo
- Run ./scripts/install.sh to install utilities
- Use ./scripts/doctor.sh to report environment status
- Run make all before committing to ensure tests, lint, and CI pass
- Use backup.sh and restore.sh with manifest verification for reliable backups
Доказательства
Workstation scripts rot for the same reason any codebase without tests rots.
v2.2.0 ships 187 passing Bats tests covering backup, restore, install, update, uninstall, doctor, cleanup, config, shell quality, and repo sync.
Backups are recorded and verified. Every backup.sh run writes a manifest_<timestamp>.json with the filename, source path, and a SHA-256 of the content.
Every push and pull request runs Bash syntax validation, ShellCheck, shfmt verification, and the Bats suite — on both macos-latest and ubuntu-latest.
- Дата записи: 2026-10-03T13:41:08.463Z