sist2/scripts/magic_static.py
2025-01-22 21:39:23 -05:00

6 lines
170 B
Python

with open("/usr/lib/file/magic.mgc", "rb") as f:
data = f.read()
print("char magic_database_buffer[%d] = {%s};" % (len(data), ",".join(str(int(b)) for b in data)))