File: zip.py

package info (click to toggle)
mupdf 1.27.0%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 29,224 kB
  • sloc: ansic: 335,320; python: 20,906; java: 7,520; javascript: 2,213; makefile: 1,152; xml: 675; cpp: 639; sh: 513; cs: 307; awk: 10; sed: 7; lisp: 3
file content (7 lines) | stat: -rwxr-xr-x 259 bytes parent folder | download
1
2
3
4
5
6
7
#!/bin/env python
# Create a reproducible build ZIP archive.

import zipfile, sys, os
zip = zipfile.ZipFile(sys.argv[1], 'w')
for file in sorted(sys.argv[2:]):
	zip.writestr(zipfile.ZipInfo(os.path.basename(file), (1997, 8, 29, 2, 14, 0)), open(file).read())