#!/bin/bash
set -ex
cd /compose/trees/CentOS-Stream-8-20220201.n.0/compose/BaseOS/ppc64le/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 CentOS-Stream-8-ppc64le-dvd -J -joliet-long -rational-rock -translation-table -x ./lost+found -part -hfs -r -l -sysid PPC -no-desktop -allow-multidot -chrp-boot -map $TEMPLATE/config_files/ppc/mapping -hfs-bless /ppc/mac -o CentOS-Stream-8-ppc64le-20220201-dvd1.iso -graft-points -path-list /compose/trees/CentOS-Stream-8-20220201.n.0/work/ppc64le/iso/CentOS-Stream-8-ppc64le-20220201-dvd1.iso-graft-points
/usr/bin/implantisomd5 --supported-iso CentOS-Stream-8-ppc64le-20220201-dvd1.iso
isoinfo -R -f -i CentOS-Stream-8-ppc64le-20220201-dvd1.iso | grep -v '/TRANS.TBL$' | sort >> CentOS-Stream-8-ppc64le-20220201-dvd1.iso.manifest
