#!/bin/bash
set -ex
cd /mnt/centos/composes/odcs-3987/compose/BaseOS/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/xorrisofs -untranslated-filenames -volid CentOS-Stream-9-BaseOS-aarch64 -J -joliet-long -rational-rock -input-charset utf-8 -x ./lost+found -eltorito-alt-boot -e images/efiboot.img -no-emul-boot -o CentOS-Stream-9-20231007.0-aarch64-dvd1.iso -graft-points -path-list /mnt/centos/composes/odcs-3987/work/aarch64/iso/CentOS-Stream-9-20231007.0-aarch64-dvd1.iso-graft-points
/usr/bin/implantisomd5 --supported-iso CentOS-Stream-9-20231007.0-aarch64-dvd1.iso
xorriso -dev CentOS-Stream-9-20231007.0-aarch64-dvd1.iso --find |
            tail -n+2 |
            tr -d "'" |
            cut -c2- |
            sort >> CentOS-Stream-9-20231007.0-aarch64-dvd1.iso.manifest
