diff options
| author | Hisham Muhammad <hisham@gobolinux.org> | 2013-10-18 18:06:02 -0300 |
|---|---|---|
| committer | Hisham Muhammad <hisham@gobolinux.org> | 2013-10-18 18:06:02 -0300 |
| commit | e86821595639434245611929b18445278e321c68 (patch) | |
| tree | 02eff0e336d2049855661bc69b99d6118ff81602 /src | |
| parent | e5610e75350879305f8ab35a5bbd10cc85eeacb7 (diff) | |
| download | luarocks-e86821595639434245611929b18445278e321c68.tar.gz luarocks-e86821595639434245611929b18445278e321c68.tar.bz2 luarocks-e86821595639434245611929b18445278e321c68.zip | |
Make make-manifest more fool-proof, for values of "fool" equalling Hisham
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 |
