diff options
author | ubq323 <ubq323@ubq323.website> | 2022-08-04 00:21:28 +0100 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2022-08-04 00:21:28 +0100 |
commit | 4767a1c24057f35f88692ded646448ee98e0a5dd (patch) | |
tree | 556347e788653e7a03ce5fca04b0f8dd102b7d88 | |
parent | 1eadba02dc48357e18a729f593c6171e0764bdc0 (diff) |
pm
-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]) |