3 # Module: mkisoimages.sh
4 # Author: Jordan K Hubbard
7 # $FreeBSD: src/release/alpha/mkisoimages.sh,v 1.2.2.4 2003/03/18 23:15:08 obrien Exp $
8 # $DragonFly: src/release/alpha/Attic/mkisoimages.sh,v 1.2 2003/06/17 04:27:19 dillon Exp $
10 # This script is used by release/Makefile to build the (optional) ISO images
11 # for a FreeBSD release. It is considered architecture dependent since each
12 # platform has a slightly unique way of making bootable CDs. This script
13 # is also allowed to generate any number of images since that is more of
14 # publishing decision than anything else.
18 # mkisoimages.sh [-b] image-label image-name base-bits-dir [extra-bits-dir]
20 # Where -b is passed if the ISO image should be made "bootable" by
21 # whatever standards this architecture supports (may be unsupported),
22 # image-label is the ISO image label, image-name is the filename of the
23 # resulting ISO image, base-bits-dir contains the image contents and
24 # extra-bits-dir, if provided, contains additional files to be merged
25 # into base-bits-dir as part of making the image.
27 if [ "x$1" = "x-b" ]; then
33 echo Usage: $0 '[-b] image-label image-name base-bits-dir [extra-bits-dir]'
37 type mkisofs 2>&1 | grep " is " >/dev/null
39 echo The mkisofs port is not installed. Trying to get it now.
40 if [ -f /usr/ports/sysutils/mkisofs/Makefile ]; then
41 cd /usr/ports/sysutils/mkisofs && make install && make clean
43 if ! pkg_add -r mkisofs; then
44 echo "Could not get it via pkg_add - please go install this"
45 echo "from the ports collection and run this script again."
54 mkisofs -r -J -V $LABEL -o $NAME $*
56 type setcdboot 2>&1 | grep " is " >/dev/null
58 echo The setcdboot port is not installed. Trying to get it now.
59 if [ -f /usr/ports/sysutils/setcdboot/Makefile ]; then
60 cd /usr/ports/sysutils/setcdboot && make install && make clean
62 if ! pkg_add -r setcdboot; then
63 echo "Could not get it via pkg_add - please go install this"
64 echo "from the ports collection and run this script again."
69 if [ "x$bootable" != "x" ]; then
70 setcdboot $NAME /boot/cdboot