- cd "$BUILD_OUTPUT" &&
- log "mkisofs -V grml $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 $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}" . ; RC=$?
- cd $CURRENT_DIR
+ if cd "$BUILD_OUTPUT" ; then
+ log "mkisofs -V grml '$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 $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}" . ; RC=$?
+
+ # generate md5sum of ISO if we are using class 'RELEASE':
+ case $CLASSES in *RELEASE*)
+ [ "$RC" = 0 ] && \
+ ( cd $ISO_OUTPUT && \
+ md5sum ${ISO_NAME} > ${ISO_NAME}.md5 && \
+ touch -r ${ISO_NAME} ${ISO_NAME}.md5 )
+ ;;
+ esac
+
+ cd $CURRENT_DIR
+ fi
+