REPACK_FIRMWARE renames foo -> foo. . Accept either form.
(images_dir: Path, base: str, soc_model: str)
| 74 | |
| 75 | |
| 76 | def find_image(images_dir: Path, base: str, soc_model: str) -> Path | None: |
| 77 | """REPACK_FIRMWARE renames foo -> foo.<soc_model>. Accept either form.""" |
| 78 | for name in (base, f"{base}.{soc_model}"): |
| 79 | p = images_dir / name |
| 80 | if p.exists(): |
| 81 | return p |
| 82 | return None |
| 83 | |
| 84 | |
| 85 | def parse_packages_file_list(path: Path) -> dict[str, str]: |