Files
linux-kernel-module-cheat/release-zip
Ciro Santilli 六四事件 法轮功 04812521b2 getting started: hide the initial build under ./build
make build awesomer and more generic, convert to python

rename ./configure to ./download-dependencies, since it wasn't configuring
anything
2018-10-14 00:00:00 +00:00

26 lines
756 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
def main():
os.makedirs(common.release_dir, exist_ok=True)
if os.path.exists(common.release_zip_file):
os.unlink(common.release_zip_file)
zipf = zipfile.ZipFile(common.release_zip_file, 'w', zipfile.ZIP_DEFLATED)
for arch in common.all_archs:
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()
if __name__ == '__main__':
main()