package-iso 963 B

123456789101112131415161718192021222324252627282930
  1. #!/bin/bash
  2. set -e
  3. source $(dirname $0)/version
  4. cd $(dirname $0)/..
  5. ARTIFACTS=$(pwd)/dist/artifacts
  6. CD=${BUILD}/cd
  7. mkdir -p ${CD}/boot/isolinux
  8. mkdir -p ${CD}/boot/isolinux
  9. if [ ! -f ${ARTIFACTS}/vmlinuz ] || [ ! -f ${ARTIFACTS}/initrd ]; then
  10. echo "Error: vmlinuz or initrd is missing in ${ARTIFACTS}/"
  11. exit 1
  12. fi
  13. cp ${ARTIFACTS}/initrd ${CD}/boot
  14. cp ${ARTIFACTS}/vmlinuz ${CD}/boot
  15. cp scripts/isolinux.cfg ${CD}/boot/isolinux
  16. cp /usr/lib/ISOLINUX/isolinux.bin ${CD}/boot/isolinux
  17. cp /usr/lib/syslinux/modules/bios/ldlinux.c32 ${CD}/boot/isolinux
  18. cd ${CD} && xorriso \
  19. -as mkisofs \
  20. -l -J -R -V "${DISTRIB_ID}" \
  21. -no-emul-boot -boot-load-size 4 -boot-info-table \
  22. -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat \
  23. -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin \
  24. -o ${ARTIFACTS}/$(echo ${DISTRIB_ID} | tr '[:upper:]' '[:lower:]').iso ${CD}