From bf9da443b2f516ec3ac0ddfdecbf647567546309 Mon Sep 17 00:00:00 2001 From: ruki Date: Fri, 7 Mar 2025 23:48:27 +0800 Subject: update the given repo --- xmake/plugins/repo/main.lua | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'xmake/plugins') 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 = {} -- cgit v1.3.1