ProCreations's picture
Publish DiscoGen exact native reproduction
6fd091d verified
Raw
History Blame Contribute Delete
470 Bytes
#!/usr/bin/env python3
import hashlib
from pathlib import Path
r=Path(__file__).resolve().parent;m=r/'BUNDLE_SHA256SUMS.txt';seen=set()
for line in m.read_text().splitlines():
h,n=line.split(' ',1);p=r/n;assert p.is_file() and hashlib.sha256(p.read_bytes()).hexdigest()==h;seen.add(n)
actual={p.relative_to(r).as_posix() for p in r.rglob('*') if p.is_file() and p!=m and '__pycache__' not in p.parts};assert seen==actual
print(f'manifest verified: {len(seen)} files')