Scripts
Build, deploy, and setup helpers for the Smart Serow project.
UI Build & Deploy
| Script |
Purpose |
build.py |
Cross-compile Flutter app for ARM64. Runs generate_theme.py first. |
deploy.py |
rsync UI bundle to Pi, optionally restart service |
build-deploy.py |
Convenience wrapper: build → deploy → restart |
Backend Deploy
| Script |
Purpose |
deploy_backend.py |
rsync Python backend to Pi, optionally restart service |
Backend and UI are completely independent — separate paths, separate services, separate deploys.
Theme Generation
| Script |
Purpose |
generate_theme.py |
Converts extra/themes/*.json → pi/ui/lib/theme/app_colors.dart |
Called automatically by build.py. Looks for theme matching navigator in config.json, falls back to default.json.
Pi Setup
| Script |
Purpose |
pi_setup.sh |
First-time Pi config (deps, permissions, UI systemd service) |
smartserow-ui.service.sample |
UI systemd unit template |
smartserow-backend.service.sample |
Backend systemd unit template |
Configuration
| File |
Purpose |
deploy_target.sample.json |
Template for deploy settings |
deploy_target.json |
Your actual deploy config (gitignored) |
Shell vs Python
Both .sh and .py versions exist for some scripts. The Python versions are more robust (better error handling, colored output). Use those.