File size: 389 Bytes
c279da6
 
 
 
 
 
 
1
2
3
4
5
6
7
8
#!/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')