ProCreations's picture
Publish DiscoGen exact native reproduction
6fd091d verified
Raw
History Blame Contribute Delete
386 Bytes
#!/usr/bin/env python3
import hashlib
from pathlib import Path
r=Path(__file__).resolve().parent;o=r/'BUNDLE_SHA256SUMS.txt';rows=[]
for p in sorted(r.rglob('*')):
if p.is_file() and p!=o and '__pycache__' not in p.parts: rows.append(f'{hashlib.sha256(p.read_bytes()).hexdigest()} {p.relative_to(r).as_posix()}')
o.write_text('\n'.join(rows)+'\n');print(f'wrote {len(rows)} entries')