common: multi arch everywhere

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-01-22 00:00:00 +00:00
parent bf5cb472de
commit 09659162fb
6 changed files with 100 additions and 100 deletions

View File

@@ -12,14 +12,14 @@ import common
from shell_helpers import LF
def main():
os.makedirs(kwargs['release_dir'], exist_ok=True)
if os.path.exists(kwargs['release_zip_file']):
os.unlink(kwargs['release_zip_file'])
zipf = zipfile.ZipFile(kwargs['release_zip_file'], 'w', zipfile.ZIP_DEFLATED)
for arch in kwargs['all_archs']:
os.makedirs(self.env['release_dir'], exist_ok=True)
if os.path.exists(self.env['release_zip_file']):
os.unlink(self.env['release_zip_file'])
zipf = zipfile.ZipFile(self.env['release_zip_file'], 'w', zipfile.ZIP_DEFLATED)
for arch in self.env['all_long_archs']:
self.setup(common.get_argparse(default_args={'arch': arch}))
zipf.write(kwargs['qcow2_file'], arcname=os.path.relpath(kwargs['qcow2_file'], kwargs['root_dir']))
zipf.write(kwargs['linux_image'], arcname=os.path.relpath(kwargs['linux_image'], kwargs['root_dir']))
zipf.write(self.env['qcow2_file'], arcname=os.path.relpath(self.env['qcow2_file'], self.env['root_dir']))
zipf.write(self.env['linux_image'], arcname=os.path.relpath(self.env['linux_image'], self.env['root_dir']))
zipf.close()
if __name__ == '__main__':