mirror of
https://github.com/leafo/moonscript.git
synced 2024-11-22 02:44:23 +00:00
update bin scripts for 5.2
This commit is contained in:
parent
cbf624d0f6
commit
999a9bed20
4
bin/moon
4
bin/moon
@ -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
|
||||||
|
@ -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")
|
||||||
|
Loading…
Reference in New Issue
Block a user