for isofile in $isopath/Core-*.iso; do
  if [ -e "$isofile" ]; then
    regexp --set=isoname "$isopath/(.*)" "$isofile"
    submenu "$isoname ->" "$isofile" {
      iso_path="$2"
      loopback loop "$iso_path"
      menuentry "MicroCore" {
        bootoptions="iso=UUID=$rootuuid/$iso_path loglevel=3"
        linux (loop)/boot/vmlinuz $bootoptions
        initrd (loop)/boot/core.gz
      }
    }
  fi
done
