Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "scripts": {
- "postpublish": [
- "mkdir /tmp/ffmpeg",
- ]
- }
- import zipfile
- import os
- srcFileName = os.getcwd() + '\bin\Release\netcoreapp1.0\prepublish.zip'
- tmpFileName = os.getcwd() + '\bin\Release\netcoreapp1.0\publish.zip'
- with zipfile.ZipFile(srcFileName, 'r') as sz:
- with zipfile.ZipFile(tmpFileName, 'w', zipfile.ZIP_DEFLATED) as z:
- for name in sz.namelist():
- srcFile = sz.open(name, "r")
- print(name)
- zi = zipfile.ZipInfo(name)
- zi.create_system = 3
- zi.external_attr = (0o764 << 16)
- z.writestr(zi, sz.read(name))
- z.close()
- sz.close()
Add Comment
Please, Sign In to add comment