diff options
-rw-r--r-- | pm.lua | 25 |
1 files changed, 13 insertions, 12 deletions
@@ -85,17 +85,6 @@ local function fmt_set(set) return "("..#keys..") " .. table.concat(keys,", ") end -local function dl(pkgname) - local deps = recursive_depsof(pkgname) - local files = recursive_filesof(pkgname) - print("all dependencies: "..fmt_set(deps)) - print("all files: "..fmt_set(files)) - for file in pairs(files) do - dlfile(file) - end - print"done" -end - local function dlfile(filename) local src=rbase..filename @@ -110,5 +99,17 @@ local function dlfile(filename) file.close() end -return {manifest=manifest,rd=recursive_depsof,rf=recursive_filesof,dl=dl} +local function dl(pkgname) + local deps = recursive_depsof(pkgname) + local files = recursive_filesof(pkgname) + print("all dependencies: "..fmt_set(deps)) + print("all files: "..fmt_set(files)) + for file in pairs(files) do + dlfile(file) + end + print"done" +end + + +return {manifest=manifest,rd=recursive_depsof,rf=recursive_filesof,dl=dl,cc=clear_cache} --dl(arg[1]) |