File
Blob: archive/legacy-c/build.py
| 1 | #!/usr/bin/env python3 |
| 2 | """Build the archived C radio without flashing it.""" |
| 3 | import argparse |
| 4 | import os |
| 5 | from pathlib import Path |
| 6 | import sys |
| 7 | |
| 8 | sys.path.insert(0, str(Path(__file__).resolve().parents[1])) |
| 9 | from support import build_experiment |
| 10 | |
| 11 | parser = argparse.ArgumentParser(description=__doc__) |
| 12 | parser.add_argument("--signaling-url", default=os.environ.get("SIGNALING_URL")) |
| 13 | parser.add_argument("--usb-signaling", action="store_true", help="Use the original host signaling bridge") |
| 14 | args = parser.parse_args() |
| 15 | if not args.usb_signaling and not args.signaling_url: |
| 16 | parser.error("Set SIGNALING_URL or --signaling-url to your deployed Worker HTTPS origin") |
| 17 | raise SystemExit(build_experiment( |
| 18 | Path(__file__).parent / "firmware", "legacy-c", ("esp-webrtc-solution",), |
| 19 | None if args.usb_signaling else args.signaling_url)) |