# Bug-Reports: see http://grml.org/bugs/
# License: This file is licensed under the GPL v2 or any later version.
################################################################################
-# TODO: support isolinux as bootloader on the ISO
+# TODO:
+# * support isolinux as bootloader on the ISO
+# * support setting grml2usb options (e.g. --bootoptions=...)
################################################################################
# define function getfilesize before "set -e" {{{
# }}}
# create necessary stuff under WRKDIR {{{
+ [ -d "$WRKDIR" ] && WRKDIR_EXISTED='true' || WRKDIR_EXISTED='false'
rm -rf "$WRKDIR/cddir" "$WRKDIR/grub_tmp"
mkdir -p "$WRKDIR/cddir" "$WRKDIR/grub_tmp"
# }}}}
cd "$ORIG_DIR"
sync
rm -rf "$WRKDIR/cddir" "$WRKDIR/grub_tmp"
+ [[ $WRKDIR_EXISTED = 'false' ]] && rmdir "$WRKDIR"
echo "Generated $ISOFILE"
# }}}