summaryrefslogtreecommitdiff
path: root/xmake/plugins
diff options
context:
space:
mode:
authorruki <[email protected]>2025-03-07 23:48:27 +0800
committerruki <[email protected]>2025-03-07 23:48:27 +0800
commitbf9da443b2f516ec3ac0ddfdecbf647567546309 (patch)
treeb07ec833849baee7ad37089f44602227232eae12 /xmake/plugins
parent71eb08513b959fc2352017b57cb413f9e0400dce (diff)
update the given repo
Diffstat (limited to 'xmake/plugins')
-rw-r--r--xmake/plugins/repo/main.lua15
1 files changed, 14 insertions, 1 deletions
diff --git a/xmake/plugins/repo/main.lua b/xmake/plugins/repo/main.lua
index 28755cae3..4e50e23d2 100644
--- a/xmake/plugins/repo/main.lua
+++ b/xmake/plugins/repo/main.lua
@@ -95,7 +95,12 @@ function _update()
environment.enter()
-- trace
- printf("updating repositories .. ")
+ local name = option.get("name")
+ if name then
+ cprintf("updating repository ${bright}%s${clear} .. ", name)
+ else
+ printf("updating repositories .. ")
+ end
if option.get("verbose") then
print("")
end
@@ -105,6 +110,14 @@ function _update()
-- get all repositories (local first)
local repos = table.join(repository.repositories(false), repository.repositories(true))
+ if name then
+ for _, repo in ipairs(repos) do
+ if repo:name() == name then
+ repos = {repo}
+ break
+ end
+ end
+ end
-- pull all repositories
local pulled = {}