toolkit/iso/py/templates/isobuild.tmpl.sh

33 lines
1004 B
Bash
Raw Normal View History

2022-06-13 14:37:50 +00:00
#!/bin/bash
# This is a template that is used to build ISO's for Rocky Linux. Only under
# extreme circumstances should you be filling this out and running manually.
# Init the container
mock \
2022-06-15 20:53:12 +00:00
-r /var/tmp/lorax-{{ major }}.cfg \
--isolation={{ isolation }} \
--enable-network \
2022-06-13 14:37:50 +00:00
--init
2022-06-15 20:53:12 +00:00
cp /var/tmp/buildImage.sh \
/var/lib/mock/{{ shortname|lower }}-{{ major }}-{{ arch }}/root/var/tmp
2022-06-13 14:37:50 +00:00
mock \
2022-06-15 20:53:12 +00:00
-r /var/tmp/lorax-{{ major }}.cfg \
2022-06-13 14:37:50 +00:00
--shell \
2022-06-15 20:53:12 +00:00
--isolation={{ isolation }} \
--enable-network -- /bin/bash /var/tmp/buildImage.sh
ret_val=$?
if [ $ret_val -eq 0 ]; then
# Copy resulting data to /var/lib/mock/{{ shortname|lower }}-{{ major }}-{{ arch }}/result
mkdir /var/lib/mock/{{ shortname|lower }}-{{ major }}-{{ arch }}/result
cp /var/lib/mock/{{ shortname|lower }}-{{ major }}-{{ arch }}/root/{{ builddir }}/lorax-{{ major }}-{{ arch }}.tar.gz \
/var/lib/mock/{{ shortname|lower }}-{{ major }}-{{ arch }}/result
else
echo "!! LORAX RUN FAILED !!"
exit 1
fi
2022-06-13 14:37:50 +00:00
# Clean up?