#!/bin/bash
set -ex
cd /mnt/compose/8/Circle-8.10-20250307.0/compose/Minimal/aarch64/iso
if ! TEMPLATE="$($(head -n1 $(which lorax) | cut -c3-) -c 'import pylorax; print(pylorax.find_templates())')"; then TEMPLATE=/usr/share/lorax; fi
/usr/bin/genisoimage -untranslated-filenames -volid Circle-8-10-aarch64-dvd -J -joliet-long -rational-rock -translation-table -input-charset utf-8 -x ./lost+found -eltorito-alt-boot -e images/efiboot.img -no-emul-boot -o Circle-8.10-aarch64-minimal.iso -graft-points -path-list /mnt/compose/8/Circle-8.10-20250307.0/work/aarch64/iso/Circle-8.10-aarch64-minimal.iso-graft-points
/usr/bin/implantisomd5 --supported-iso Circle-8.10-aarch64-minimal.iso
isoinfo -R -f -i Circle-8.10-aarch64-minimal.iso | grep -v '/TRANS.TBL$' | sort >> Circle-8.10-aarch64-minimal.iso.manifest
