#!/bin/bash
set -ex
cd /mnt/compose/8/Circle-8.10-20250307.0/compose/Minimal/x86_64/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-x86_64-dvd -J -joliet-long -rational-rock -translation-table -input-charset utf-8 -x ./lost+found -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e images/efiboot.img -no-emul-boot -o Circle-8.10-x86_64-minimal.iso -graft-points -path-list /mnt/compose/8/Circle-8.10-20250307.0/work/x86_64/iso/Circle-8.10-x86_64-minimal.iso-graft-points
/usr/bin/isohybrid --uefi Circle-8.10-x86_64-minimal.iso
/usr/bin/implantisomd5 --supported-iso Circle-8.10-x86_64-minimal.iso
isoinfo -R -f -i Circle-8.10-x86_64-minimal.iso | grep -v '/TRANS.TBL$' | sort >> Circle-8.10-x86_64-minimal.iso.manifest
