1
0
mirror of https://github.com/kepler155c/opus synced 2025-10-24 04:07:40 +00:00

bulk download

This commit is contained in:
kepler155c@gmail.com
2019-03-06 16:56:41 -05:00
parent ce9ffa6c3a
commit a4145951f7
2 changed files with 47 additions and 2 deletions

View File

@@ -1,3 +1,4 @@
local BulkGet = require('bulkget')
local Git = require('git')
local Packages = require('packages')
local Util = require('util')
@@ -53,10 +54,21 @@ local function install(name, isUpdate)
local list = Git.list(manifest.repository)
local showProgress = progress(Util.size(list))
local getList = { }
for path, entry in pairs(list) do
Util.download(entry.url, fs.combine(packageDir, path))
showProgress()
table.insert(getList, {
path = fs.combine(packageDir, path),
url = entry.url
})
end
BulkGet.download(getList, function(_, s, m)
if not s then
error(m)
end
showProgress()
end)
end
if action == 'list' then