#!/bin/bash
set -ex
cd /mnt/centos/composes/odcs-2662/compose/BaseOS/s390x/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-s390x -J -joliet-long -rational-rock -input-charset utf-8 -x ./lost+found -eltorito-boot images/cdboot.img -no-emul-boot -o CentOS_Stream-9-20221201.t.0-s390x-dvd1.iso -graft-points -path-list /mnt/centos/composes/odcs-2662/work/s390x/iso/CentOS_Stream-9-20221201.t.0-s390x-dvd1.iso-graft-points
/usr/bin/implantisomd5 CentOS_Stream-9-20221201.t.0-s390x-dvd1.iso
xorriso -dev CentOS_Stream-9-20221201.t.0-s390x-dvd1.iso --find |
            tail -n+2 |
            tr -d "'" |
            cut -c2- |
            sort >> CentOS_Stream-9-20221201.t.0-s390x-dvd1.iso.manifest
