diff options
| author | ruki <[email protected]> | 2018-08-25 00:51:54 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-08-24 23:11:25 +0800 |
| commit | 3834432a2fa50afc439288a4f7862261aedf41ae (patch) | |
| tree | 6080893188bc4791e3044fa1b53f4c95a2e77ee9 /xmake/plugins | |
| parent | e00c2e6bbc3b363f191e514dc553ac6041fe2e0e (diff) | |
improve to load repo and package
Diffstat (limited to 'xmake/plugins')
| -rw-r--r-- | xmake/plugins/repo/main.lua | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/xmake/plugins/repo/main.lua b/xmake/plugins/repo/main.lua index 25a405f2e..91c64225c 100644 --- a/xmake/plugins/repo/main.lua +++ b/xmake/plugins/repo/main.lua @@ -100,12 +100,16 @@ function _update() -- remove repeat and only pull the first repository if not pulled[repodir] then if os.isdir(repodir) then + + -- update the local repository with the remote url + if not os.isdir(repo:url()) then - -- trace - vprint("pulling repository(%s): %s to %s ..", repo:name(), repo:url(), repodir) + -- trace + vprint("pulling repository(%s): %s to %s ..", repo:name(), repo:url(), repodir) - -- pull it - git.pull({verbose = option.get("verbose"), branch = "master", repodir = repodir}) + -- pull it + git.pull({verbose = option.get("verbose"), branch = "master", repodir = repodir}) + end else -- trace vprint("cloning repository(%s): %s to %s ..", repo:name(), repo:url(), repodir) |
