Skip to content

Commit

Permalink
add back the user-repo
Browse files Browse the repository at this point in the history
  • Loading branch information
BernardXiong committed Aug 15, 2023
1 parent 0a90a2d commit 29c5dfd
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions tools/scripts/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ set_xmakever("2.7.2")

local dir = ""
local rcfiles = os.getenv("XMAKE_RCFILES")
local user_repo = os.getenv("RT_XMAKE_USERREPO_DIR")

if rcfiles then
dir = path.directory(rcfiles) .. "/"
end
Expand All @@ -33,9 +35,18 @@ includes(dir .. "rules.lua")
includes(dir .. "tasks.lua")
includes(dir .. "toolchains.lua")

if user_repo then
add_repositories("user-repo " .. user_repo)
end

for _, item in ipairs(os.dirs(dir .. "../../repo*")) do
bn = path.basename(item)
add_repositories(bn .. " " .. item)
if os.isfile(item .. "/repo/xmake.lua") then
bn = path.basename(item)
add_repositories(bn .. " " .. item .. "/repo")
elseif os.isdir(item .. "/packages") and os.isfile(item .. "/xmake.lua") then
bn = path.basename(item)
add_repositories(bn .. " " .. item)
end
end

local archs = {
Expand Down

0 comments on commit 29c5dfd

Please sign in to comment.