From 9f1d3468c22adabab1ad06cdb0014c4f6ef2caa6 Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 4 Jun 2015 12:01:02 +0800 Subject: find the given tool from name --- xmake/scripts/action/_lua.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'xmake/scripts/action/_lua.lua') diff --git a/xmake/scripts/action/_lua.lua b/xmake/scripts/action/_lua.lua index 1018b1722..2f7597b03 100644 --- a/xmake/scripts/action/_lua.lua +++ b/xmake/scripts/action/_lua.lua @@ -29,6 +29,7 @@ local path = require("base/path") local utils = require("base/utils") local config = require("base/config") local string = require("base/string") +local tools = require("tools/tools") -- done the given config function _lua.done() @@ -75,9 +76,9 @@ function _lua.done() file = path.absolute(file) end - -- attempt to load script from the xmake tool directory + -- attempt to load script from the tools directory if not os.isfile(file) then - file = xmake._SCRIPTS_DIR .. "/tools/" .. options.script .. ".lua" + file = tools.find(options.script, xmake._SCRIPTS_DIR .. "/tools") end -- load and run the script file -- cgit v1.3.1