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
require "alt_getopt"
require "moonscript"
local moonscript = require "moonscript"
local util = require "moonscript.util"
local errors = require "moonscript.errors"
@ -66,7 +66,7 @@ if not moonscript_chunk then
os.exit(1)
end
getfenv(moonscript_chunk).arg = new_arg
util.getfenv(moonscript_chunk).arg = new_arg
if not opts.d then
local err, trace

View File

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