update bin scripts for 5.2

This commit is contained in:
leaf corcoran 2013-01-02 17:32:00 -08:00
parent cbf624d0f6
commit 999a9bed20
2 changed files with 4 additions and 5 deletions

View File

@ -1,7 +1,7 @@
#!/usr/bin/env lua #!/usr/bin/env lua
require "alt_getopt" require "alt_getopt"
require "moonscript" local moonscript = require "moonscript"
local util = require "moonscript.util" local util = require "moonscript.util"
local errors = require "moonscript.errors" local errors = require "moonscript.errors"
@ -66,7 +66,7 @@ if not moonscript_chunk then
os.exit(1) os.exit(1)
end end
getfenv(moonscript_chunk).arg = new_arg util.getfenv(moonscript_chunk).arg = new_arg
if not opts.d then if not opts.d then
local err, trace local err, trace

View File

@ -1,7 +1,5 @@
#!/usr/bin/env lua #!/usr/bin/env lua
module("moonscript", package.seeall)
local parse = require "moonscript.parse" local parse = require "moonscript.parse"
local compile = require "moonscript.compile" local compile = require "moonscript.compile"
local util = require "moonscript.util" local util = require "moonscript.util"
@ -267,7 +265,8 @@ function get_sleep_func()
require "socket" require "socket"
sleep = socket.sleep sleep = socket.sleep
end) then end) then
sleep = moonscript._sleep -- This is set by moonc.c in windows binaries
sleep = require("moonscript")._sleep
end end
if not sleep then if not sleep then
error("Missing sleep function; install LuaSocket") error("Missing sleep function; install LuaSocket")