C) CONFIG="$OPTARG" ;;
g) GRML_NAME="$OPTARG" ;;
i) ISO_NAME="$OPTARG" ;;
- o) OUTPUT="$OPTARG"
- CHROOT_OUTPUT="$OUTPUT/grml_chroot"
- BUILD_OUTPUT="$OUTPUT/grml_cd"
- ISO_OUTPUT="$OUTPUT/grml_isos"
- ;;
+ o) OUTPUT="$OPTARG" ;;
q) SKIP_MKSQUASHFS=1 ;;
r) RELEASENAME="$OPTARG" ;;
s) SUITE="$OPTARG" ;;
[ -n "$OUTPUT" ] || bailout 1 "Error: \$OUTPUT unset, please set it in $LIVE_CONF or
specify it on the command line using the -o option."
+# set subdirectories according to $OUTPUT:
+CHROOT_OUTPUT="$OUTPUT/grml_chroot"
+BUILD_OUTPUT="$OUTPUT/grml_cd"
+ISO_OUTPUT="$OUTPUT/grml_isos"
+
# trim characters that are known to cause problems inside $GRML_NAME;
# for example isolinux does not like '-' inside the directory name
[ -n "$GRML_NAME" ] && export SHORT_GRML_NAME="$(echo $GRML_NAME | tr -d ',./;\- ')"
fi
if [ -f "${ISO_OUTPUT}/${ISO_NAME}" -a -z "$UPDATE" -a -z "$BUILD_ONLY" -a -z "$BUILD_DIRTY" ] ; then
+
+ # support mkisofs as well as genisoimage
+ if which mkisofs >/dev/null 2>&1; then
+ MKISOFS=mkisofs
+ elif which genisoimage >/dev/null 2>&1; then
+ MKISOFS=genisoimage
+ else
+ log "Sorry, neither mkisofs nor genisoimage available - can not create ISO."
+ eerror "Sorry, neither mkisofs nor genisoimage available - can not create ISO." ; eend 1
+ bailout
+ fi
+
log "$ISO_OUTPUT exists already, skipping stage 'iso build'"
ewarn "$ISO_OUTPUT exists already, skipping stage 'iso build'" ; eend 0
else
CURRENT_DIR=$(pwd)
if cd "$BUILD_OUTPUT" ; then
- log "mkisofs -V '${GRML_NAME} ${VERSION}' -publisher 'grml-live | grml.org' -l -r -J -no-emul-boot -boot-load-size 4 -boot-info-table -b $BOOT_FILE -o ${ISO_OUTPUT}/${ISO_NAME} ."
- mkisofs -V "${GRML_NAME} ${VERSION}" -publisher 'grml-live | grml.org' \
+ log "$MKISOFS -V '${GRML_NAME} ${VERSION}' -publisher 'grml-live | grml.org' -l -r -J -no-emul-boot -boot-load-size 4 -boot-info-table -b $BOOT_FILE -o ${ISO_OUTPUT}/${ISO_NAME} ."
+ $MKISOFS -V "${GRML_NAME} ${VERSION}" -publisher 'grml-live | grml.org' \
-l -r -J -no-emul-boot -boot-load-size 4 -boot-info-table \
-b $BOOT_FILE -no-pad \
-o "${ISO_OUTPUT}/${ISO_NAME}" . ; RC=$?