for efifile in $isopath/*.efi $isopath/*.EFI; do
  if [ -e "$efifile" ]; then
    regexp --set=efiname "$isopath/(.*)" "$efifile"
    menuentry "$efiname" "$efifile" {
      efi_file="$2"
      chainloader $efi_file
    }
  fi
done
