summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2022-08-04 00:21:28 +0100
committerubq323 <ubq323@ubq323.website>2022-08-04 00:21:28 +0100
commit4767a1c24057f35f88692ded646448ee98e0a5dd (patch)
tree556347e788653e7a03ce5fca04b0f8dd102b7d88
parent1eadba02dc48357e18a729f593c6171e0764bdc0 (diff)
pm
-rw-r--r--pm.lua25
1 files changed, 13 insertions, 12 deletions
diff --git a/pm.lua b/pm.lua
index 65b56b7..f50cb0c 100644
--- a/pm.lua
+++ b/pm.lua
@@ -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])