diff options
author | Marcel Moolenaar <marcel@FreeBSD.org> | 2004-08-10 05:43:40 +0000 |
---|---|---|
committer | Marcel Moolenaar <marcel@FreeBSD.org> | 2004-08-10 05:43:40 +0000 |
commit | a6c0289214378b20328d69eb3ea5a92e7b696f55 (patch) | |
tree | 1cb56cdd0b529c7aabcf4beb4005027d39da7e94 /release/ia64/mkisoimages.sh | |
parent | 84b7e70dfcb960009efa5306c6a1115dc0270f74 (diff) | |
download | src-a6c0289214378b20328d69eb3ea5a92e7b696f55.tar.gz src-a6c0289214378b20328d69eb3ea5a92e7b696f55.zip |
Favor building the cdrtools port over fetching the package. There
hasn't been any package build for ia64 for a long time and in this
case it means that the cdrtools package on the FTP sites is one that
doesn't have mkisofs. This breaks the release build. By trying to
build the port first, we protect ourselves a bit more against this.
Notes
Notes:
svn path=/head/; revision=133426
Diffstat (limited to 'release/ia64/mkisoimages.sh')
-rw-r--r-- | release/ia64/mkisoimages.sh | 46 |
1 files changed, 22 insertions, 24 deletions
diff --git a/release/ia64/mkisoimages.sh b/release/ia64/mkisoimages.sh index d7b38b2412d8..54ea8f79d2d2 100644 --- a/release/ia64/mkisoimages.sh +++ b/release/ia64/mkisoimages.sh @@ -23,18 +23,8 @@ # extra-bits-dir, if provided, contains additional files to be merged # into base-bits-dir as part of making the image. -publisher="The FreeBSD Project. http://www.freebsd.org/" set -e -# The hackery function is to help with the development of the release -# process. It's not intended to be an integral part of it. JFYI... -hackery() { - echo "Sorry, no hackery today and you're out of milk too" - exit 2 -} - -MKISOFS_PORT=/usr/ports/sysutils/cdrtools - if [ "x$1" = "x-b" ]; then bootable=yes shift @@ -47,23 +37,27 @@ if [ $# -lt 3 ]; then exit 1 fi -BOOTOPTS="" LABEL=$1; shift NAME=$1; shift BASE=$1; shift -if ! which mkisofs; then - echo 'mkisofs(8) does not exist. Fetching the package...' - if ! pkg_add -r cdrtools; then - if [ -f /usr/ports/sysutils/cdrtools/Makefile ]; then - echo "Don't worry; building the port..." - if ! (cd $MKISOFS_PORT && make install BATCH=yes && make clean); then - echo "Worry; reverting to hackery..." - hackery - fi - else - echo "Ports not present. Reverting to hackery..." - hackery +MKISOFS=mkisofs +MKISOFS_PKG=cdrtools +MKISOFS_PORT=/usr/ports/sysutils/${MKISOFS_PKG} + +if ! which ${MKISOFS} > /dev/null; then + echo -n "${MKISOFS}(8) does not exist: " + if [ -f ${MKISOFS_PORT}/Makefile ]; then + echo building the port... + if ! (cd ${MKISOFS_PORT} && make install BATCH=yes && make clean); then + echo "error: cannot build ${MKISOFS}(8). Bailing out..." + exit 2 + fi + else + echo fetching the package... + if ! pkg_add -r ${MKISOFS_PKG}; then + echo "error: cannot fetch ${MKISOFS}(8). Bailing out..." + exit 2 fi fi fi @@ -90,8 +84,12 @@ if [ $bootable = yes ]; then umount $MNT mdconfig -d -u $md BOOTOPTS="-b $EFIPART -no-emul-boot" +else + BOOTOPTS="" fi -mkisofs $BOOTOPTS -r -J -V $LABEL -P "$publisher" -o $NAME $BASE $* +publisher="The FreeBSD Project. http://www.freebsd.org/" + +$MKISOFS $BOOTOPTS -r -J -V $LABEL -P "$publisher" -o $NAME $BASE $* rm -f $BASE/$EFIPART exit 0 |