summaryrefslogtreecommitdiff
path: root/xmake/plugins
diff options
context:
space:
mode:
authorruki <[email protected]>2018-08-25 00:51:54 +0800
committerruki <[email protected]>2018-08-24 23:11:25 +0800
commit3834432a2fa50afc439288a4f7862261aedf41ae (patch)
tree6080893188bc4791e3044fa1b53f4c95a2e77ee9 /xmake/plugins
parente00c2e6bbc3b363f191e514dc553ac6041fe2e0e (diff)
improve to load repo and package
Diffstat (limited to 'xmake/plugins')
-rw-r--r--xmake/plugins/repo/main.lua12
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)