All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] LUA script engine for grub2
@ 2009-04-07 14:31 Bean
  2009-04-07 15:18 ` phcoder
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Bean @ 2009-04-07 14:31 UTC (permalink / raw)
  To: The development of GRUB 2

[-- Attachment #1: Type: text/plain, Size: 754 bytes --]

Hi,

This patch integrate the LUA script engine to grub2. Before applying
this patch, you should apply the split module patch split_3.diff
first.

BTW, I forget to add Makefile.in the previous split_3.diff, so that
handler.lst will not be generated, I include it in this one.

To try the LUA engine, you can enter command line, and use:

parser.lua

Inside lua, you can use grub.run to execute grub commands, such as:

grub.run("ls", "-l")

To switch back to sh, you can run this command:

grub.run("parser.sh")

Here is a small lua program to solve the hanoi tower:

function hanoi(n,a,b,c)
if (n == 1) then
  print ("move from", a, "to", c)
else
  hanoi (n-1, a, c, b)
  hanoi (1, a, b, c)
  hanoi (n-1, b, a, c)
end
end
hanoi (3, 1, 2, 3)



-- 
Bean

[-- Attachment #2: lua.zip --]
[-- Type: application/zip, Size: 116386 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2009-05-16 13:32 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-07 14:31 [PATCH] LUA script engine for grub2 Bean
2009-04-07 15:18 ` phcoder
2009-04-07 16:15 ` Vesa Jääskeläinen
2009-04-07 18:27   ` Bean
2009-04-08 14:40     ` Colin D Bennett
2009-04-08 17:02       ` Bean
2009-04-13 14:27 ` Robert Millan
2009-04-14 15:33   ` Yoshinori K. Okuji
2009-04-14 16:18     ` Bean
2009-05-03  8:46       ` Bean
2009-05-16 12:37         ` Bean
2009-05-16 13:31           ` Felix Zielcke

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.