summaryrefslogtreecommitdiff
path: root/xmake/plugins/lua
diff options
context:
space:
mode:
authorruki <[email protected]>2019-11-29 21:00:08 +0800
committerruki <[email protected]>2019-11-29 00:00:49 +0800
commit3684e6e787a021555f33b5cc6731815507e897ee (patch)
treed4659f45a8dd41db8d25d4c813810a35ee92113e /xmake/plugins/lua
parent6e42cbc962f56c1e841f66cfda0e4c8f8cde787a (diff)
add coroutine instance for scheduler
Diffstat (limited to 'xmake/plugins/lua')
-rw-r--r--xmake/plugins/lua/xmake.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/xmake/plugins/lua/xmake.lua b/xmake/plugins/lua/xmake.lua
index dc5e56e67..a9135aa1b 100644
--- a/xmake/plugins/lua/xmake.lua
+++ b/xmake/plugins/lua/xmake.lua
@@ -57,13 +57,13 @@ task("lua")
if path.extension(script) == ".lua" and os.isfile(script) then
-- run the given lua script file (xmake lua /tmp/script.lua)
- vprint("runing given lua script file: %s", path.relative(script))
+ vprint("running given lua script file: %s", path.relative(script))
import(path.basename(script), {rootdir = path.directory(script), anonymous = true})(unpack(option.get("arguments") or {}))
elseif os.isfile(path.join(os.scriptdir(), "scripts", script .. ".lua")) then
-- run builtin lua script (xmake lua echo "hello xmake")
- vprint("runing builtin lua script: %s", script)
+ vprint("running builtin lua script: %s", script)
import("scripts." .. script, {anonymous = true})(unpack(option.get("arguments") or {}))
else
@@ -78,11 +78,11 @@ task("lua")
local result = nil
if object then
-- run builtin modules (xmake lua core.xxx.xxx)
- vprint("runing builtin module: %s", script)
+ vprint("running builtin module: %s", script)
result = object(unpack(option.get("arguments") or {}))
else
-- run imported modules (xmake lua core.xxx.xxx)
- vprint("runing imported module: %s", script)
+ vprint("running imported module: %s", script)
result = import(script, {anonymous = true})(unpack(option.get("arguments") or {}))
end
if result ~= nil then utils.dump(result) end