zip-image: factor out with common

Notably, only include the strictly necessary files in the archive, otherwise
initrd's from other builds might get in the way.
This commit is contained in:
Ciro Santilli
2018-08-09 22:25:52 +01:00
parent f5a997b2b6
commit b675cf35cb
6 changed files with 11 additions and 10 deletions

View File

@@ -1,10 +1,10 @@
#!/usr/bin/env bash
. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/common"
common_setup
cd "$common_root_dir"
outfile="${common_out_dir}/lkmc-${common_sha}.zip"
rm -f "$outfile"
for arch in x86_64 arm aarch64; do
for common_arch in x86_64 arm aarch64; do
common_setup
rm -f "${common_images_dir}/rootfs.ext2"
zip -r "$outfile" "$common_images_dir"
zip -r "$outfile" "${common_qcow2_file#${common_root_dir}/}" "${common_linux_image#${common_root_dir}/}"
done