mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-12-22 16:30:23 +00:00
4feacc0065
similar to Quake 3: all the archives and folders get mounted to the same mountpoint in the VFS, read access to files in the VFS is transparent
22 lines
501 B
Python
22 lines
501 B
Python
#!/usr/bin/env python3
|
|
|
|
import sys
|
|
import os
|
|
import zipfile
|
|
|
|
if len(sys.argv) < 3:
|
|
print('usage: mkzip <lstfile> <zipfile>')
|
|
sys.exit(1)
|
|
|
|
lst = []
|
|
with open(sys.argv[1], 'r') as f:
|
|
for line in f:
|
|
line = line.strip()
|
|
if line == '' or line[0] == '#':
|
|
continue
|
|
tok = line.split()
|
|
lst.append((tok[0], tok[1]))
|
|
|
|
with zipfile.ZipFile(sys.argv[2], 'w', allowZip64=False) as zipf:
|
|
for (fname, aname) in lst:
|
|
zipf.write(fname, arcname=aname)
|