| #!/usr/bin/env python3 | |
| import hashlib | |
| from pathlib import Path | |
| root = Path(__file__).resolve().parent | |
| out = root / "BUNDLE_SHA256SUMS.txt" | |
| rows = [] | |
| for path in sorted(root.rglob("*")): | |
| if path.is_file() and path != out and "__pycache__" not in path.parts: | |
| rows.append(f"{hashlib.sha256(path.read_bytes()).hexdigest()} {path.relative_to(root).as_posix()}") | |
| out.write_text("\n".join(rows) + "\n") | |
| print(f"manifest_entries={len(rows)}") | |