aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2013-10-18 18:06:02 -0300
committerHisham Muhammad <hisham@gobolinux.org>2013-10-18 18:06:02 -0300
commite86821595639434245611929b18445278e321c68 (patch)
tree02eff0e336d2049855661bc69b99d6118ff81602
parente5610e75350879305f8ab35a5bbd10cc85eeacb7 (diff)
downloadluarocks-e86821595639434245611929b18445278e321c68.tar.gz
luarocks-e86821595639434245611929b18445278e321c68.tar.bz2
luarocks-e86821595639434245611929b18445278e321c68.zip
Make make-manifest more fool-proof, for values of "fool" equalling Hisham
-rw-r--r--src/luarocks/make_manifest.lua11
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")
8local cfg = require("luarocks.cfg") 8local cfg = require("luarocks.cfg")
9local util = require("luarocks.util") 9local util = require("luarocks.util")
10local deps = require("luarocks.deps") 10local deps = require("luarocks.deps")
11local fs = require("luarocks.fs")
12local dir = require("luarocks.dir")
11 13
12help_summary = "Compile a manifest file for a repository." 14help_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
40end 51end