1
0
mirror of https://github.com/rancher/os.git synced 2025-08-31 22:32:14 +00:00
Files
os/scripts/package-iso

37 lines
1.0 KiB
Plaintext
Raw Normal View History

#!/bin/bash
2016-05-06 10:12:09 -07:00
set -e
2016-05-06 10:12:09 -07:00
source $(dirname $0)/version
cd $(dirname $0)/..
2016-05-06 10:12:09 -07:00
ARTIFACTS=$(pwd)/dist/artifacts
2015-08-07 19:34:05 +05:00
CD=${BUILD}/cd
2016-08-18 22:41:30 -07:00
ISO=${ARTIFACTS}/$(echo ${DISTRIB_ID} | tr '[:upper:]' '[:lower:]').iso
CHECKSUM=iso-checksums.txt
2015-08-07 19:34:05 +05:00
2016-10-10 15:23:15 -07:00
mkdir -p ${CD}/boot/isolinux
2015-08-06 00:04:46 -07:00
mkdir -p ${CD}/boot/isolinux
2016-06-13 14:30:21 -07:00
if [ ! -f ${ARTIFACTS}/vmlinuz ] || [ ! -f ${ARTIFACTS}/initrd ]; then
2016-06-29 22:09:37 -07:00
exit 0
2016-06-06 16:06:10 -07:00
fi
2016-05-06 10:12:09 -07:00
cp ${ARTIFACTS}/initrd ${CD}/boot
cp ${ARTIFACTS}/vmlinuz ${CD}/boot
cp scripts/isolinux.cfg ${CD}/boot/isolinux
cp /usr/lib/ISOLINUX/isolinux.bin ${CD}/boot/isolinux
cp /usr/lib/syslinux/modules/bios/ldlinux.c32 ${CD}/boot/isolinux
cd ${CD} && xorriso \
-as mkisofs \
2016-05-06 10:12:09 -07:00
-l -J -R -V "${DISTRIB_ID}" \
-no-emul-boot -boot-load-size 4 -boot-info-table \
-b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat \
-isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin \
2016-08-18 22:41:30 -07:00
-o $ISO ${CD}
cd $(dirname $ISO)
rm -f $CHECKSUM
for algo in sha256 md5; do
echo "$algo: $(${algo}sum $(basename $ISO))" >> $CHECKSUM
done