mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-13 20:12:26 +00:00
18 lines
565 B
Python
Executable File
18 lines
565 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import os
|
|
import subprocess
|
|
import zipfile
|
|
|
|
import common
|
|
|
|
outfile = os.path.join(common.out_dir, 'lkmc-{}.zip'.format(common.sha))
|
|
if os.path.exists(outfile):
|
|
os.unlink(outfile)
|
|
zipf = zipfile.ZipFile(outfile, 'w', zipfile.ZIP_DEFLATED)
|
|
for arch in common.arches:
|
|
common.setup(common.get_argparse(default_args={'arch': arch}))
|
|
zipf.write(common.qcow2_file, arcname=os.path.relpath(common.qcow2_file, common.root_dir))
|
|
zipf.write(common.linux_image, arcname=os.path.relpath(common.linux_image, common.root_dir))
|
|
zipf.close()
|