diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/luarocks/make_manifest.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/luarocks/make_manifest.lua b/src/luarocks/make_manifest.lua index a698f830..53fffc88 100644 --- a/src/luarocks/make_manifest.lua +++ b/src/luarocks/make_manifest.lua | |||
@@ -8,6 +8,8 @@ local index = require("luarocks.index") | |||
8 | local cfg = require("luarocks.cfg") | 8 | local cfg = require("luarocks.cfg") |
9 | local util = require("luarocks.util") | 9 | local util = require("luarocks.util") |
10 | local deps = require("luarocks.deps") | 10 | local deps = require("luarocks.deps") |
11 | local fs = require("luarocks.fs") | ||
12 | local dir = require("luarocks.dir") | ||
11 | 13 | ||
12 | help_summary = "Compile a manifest file for a repository." | 14 | help_summary = "Compile a manifest file for a repository." |
13 | 15 | ||
@@ -31,10 +33,19 @@ function run(...) | |||
31 | 33 | ||
32 | util.printout("Making manifest for "..repo) | 34 | util.printout("Making manifest for "..repo) |
33 | 35 | ||
36 | if repo:match("/lib/luarocks") and not flags["local-tree"] then | ||
37 | util.warning("This looks like a local rocks tree, but you did not pass --local-tree.") | ||
38 | end | ||
39 | |||
34 | local ok, err = manif.make_manifest(repo, deps.get_deps_mode(flags), not flags["local-tree"]) | 40 | local ok, err = manif.make_manifest(repo, deps.get_deps_mode(flags), not flags["local-tree"]) |
35 | if ok and not flags["local-tree"] then | 41 | if ok and not flags["local-tree"] then |
36 | util.printout("Generating index.html for "..repo) | 42 | util.printout("Generating index.html for "..repo) |
37 | index.make_index(repo) | 43 | index.make_index(repo) |
38 | end | 44 | end |
45 | if flags["local-tree"] then | ||
46 | for luaver in util.lua_versions() do | ||
47 | fs.delete(dir.path(repo, "manifest-"..luaver)) | ||
48 | end | ||
49 | end | ||
39 | return ok, err | 50 | return ok, err |
40 | end | 51 | end |