mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-25 19:21:35 +01:00
27 lines
846 B
Python
Executable File
27 lines
846 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
'''
|
|
https://github.com/cirosantilli/linux-kernel-module-cheat#release-zip
|
|
'''
|
|
|
|
import os
|
|
import subprocess
|
|
import zipfile
|
|
|
|
import common
|
|
from shell_helpers import LF
|
|
|
|
def main():
|
|
os.makedirs(self.env['release_dir'], exist_ok=True)
|
|
if os.path.exists(self.env['release_zip_file']):
|
|
self.sh.rmrf(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(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__':
|
|
main()
|