Imported from ../lua-5.0.1.tar.gz.
[lua.git] / test / luac.lua
blobb009ae9da5e7558147e674e5d5f2157ed67f9084
1 -- bare-bones luac in Lua
2 -- usage: lua luac.lua file.lua
4 assert(arg[1]~=nil and arg[2]==nil,"usage: lua luac.lua file.lua")
5 f=assert(io.open("luac.out","wb"))
6 f:write(string.dump(assert(loadfile(arg[1]))))
7 io.close(f)