for imgfile in $isopath/menuet*.img; do
  if [ -e "$imgfile" ]; then
    regexp --set=imgname "$isopath/(.*)" "$imgfile"
    menuentry "$imgname (memdisk)" "$imgfile" {
      img_path="$2"
      bootoptions="raw"
      linux16 $prefix/memdisk $bootoptions
      initrd16 $img_path
    }
  fi
done
