diff options
| author | ruki <[email protected]> | 2025-03-07 23:48:27 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-03-07 23:48:27 +0800 |
| commit | bf9da443b2f516ec3ac0ddfdecbf647567546309 (patch) | |
| tree | b07ec833849baee7ad37089f44602227232eae12 /xmake/plugins | |
| parent | 71eb08513b959fc2352017b57cb413f9e0400dce (diff) | |
update the given repo
Diffstat (limited to 'xmake/plugins')
| -rw-r--r-- | xmake/plugins/repo/main.lua | 15 |
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 = {} |
