summaryrefslogtreecommitdiff
path: root/xmake/core/package/package.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2019-04-28 21:58:04 +0900
committerruki <[email protected]>2019-04-28 21:58:04 +0900
commitc32d4b012063bb7dec09c2cd429be294e6e60c4a (patch)
treee3dcfd5f836d9d1b93d4d37424bf7b94014c8e9c /xmake/core/package/package.lua
parent2f36d5f5cd54d49ffe7eff324dc0522451deaae5 (diff)
improve on_install for package
Diffstat (limited to 'xmake/core/package/package.lua')
-rw-r--r--xmake/core/package/package.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua
index ff5335291..314fbf9d6 100644
--- a/xmake/core/package/package.lua
+++ b/xmake/core/package/package.lua
@@ -667,12 +667,12 @@ function _instance:script(name, generic)
local pattern = plat .. '|' .. arch
for _pattern, _script in pairs(script) do
local hosts = {}
- _pattern = _pattern:gsub("@(.+)|", function (v)
- -- get and remove hosts for `android@macosx,linux`
+ _pattern = _pattern:gsub("@(.+)", function (v)
+ -- get and remove hosts for `android|armv7-a@macosx,linux`
for _, host in ipairs(v:split(',')) do
hosts[host] = true
end
- return "|"
+ return ""
end)
if not _pattern:startswith("__") and pattern:find('^' .. _pattern .. '$') and (#hosts == 0 or hosts[os.host()]) then
result = _script
@@ -691,7 +691,7 @@ function _instance:script(name, generic)
end
return ""
end)
- if not _pattern:startswith("__") and pattern:find('^' .. _pattern .. '$') and (#hosts == 0 or hosts[os.host()]) then
+ if not _pattern:startswith("__") and plat:find('^' .. _pattern .. '$') and (#hosts == 0 or hosts[os.host()]) then
result = _script
break
end