#!/bin/bash
set -ex
cd /mnt/centos/composes/stream-8/odcs-3189/compose/BaseOS/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/xorrisofs -untranslated-filenames -volid CentOS-Stream-8-BaseOS-x86_64 -J -joliet-long -rational-rock -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 CentOS-Stream-8-20230330.t.3-x86_64-dvd1.iso -graft-points -path-list /mnt/centos/composes/stream-8/odcs-3189/work/x86_64/iso/CentOS-Stream-8-20230330.t.3-x86_64-dvd1.iso-graft-points
/usr/bin/isohybrid --uefi CentOS-Stream-8-20230330.t.3-x86_64-dvd1.iso
/usr/bin/implantisomd5 CentOS-Stream-8-20230330.t.3-x86_64-dvd1.iso
xorriso -dev CentOS-Stream-8-20230330.t.3-x86_64-dvd1.iso --find |
            tail -n+2 |
            tr -d "'" |
            cut -c2- |
            sort >> CentOS-Stream-8-20230330.t.3-x86_64-dvd1.iso.manifest
