Mercurial > repo
comparison share/lua/5.2/luarocks/make_manifest.lua @ 1132:d137f631bad5
<GreyKnight> (cd luabuild/luarocks-2.0.12; make install)
author | HackBot |
---|---|
date | Fri, 14 Dec 2012 22:24:27 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1131:ff65dfb63263 | 1132:d137f631bad5 |
---|---|
1 | |
2 --- Module implementing the luarocks-admin "make_manifest" command. | |
3 -- Compile a manifest file for a repository. | |
4 module("luarocks.make_manifest", package.seeall) | |
5 | |
6 local manif = require("luarocks.manif") | |
7 local index = require("luarocks.index") | |
8 local cfg = require("luarocks.cfg") | |
9 local util = require("luarocks.util") | |
10 local deps = require("luarocks.deps") | |
11 | |
12 help_summary = "Compile a manifest file for a repository." | |
13 | |
14 help = [[ | |
15 <argument>, if given, is a local repository pathname. | |
16 ]] | |
17 | |
18 --- Driver function for "make_manifest" command. | |
19 -- @param repo string or nil: Pathname of a local repository. If not given, | |
20 -- the default local repository configured as cfg.rocks_dir is used. | |
21 -- @return boolean or (nil, string): True if manifest was generated, | |
22 -- or nil and an error message. | |
23 function run(...) | |
24 local flags, repo = util.parse_flags(...) | |
25 | |
26 assert(type(repo) == "string" or not repo) | |
27 repo = repo or cfg.rocks_dir | |
28 | |
29 util.printout("Making manifest for "..repo) | |
30 | |
31 local ok, err = manif.make_manifest(repo, deps.get_deps_mode(flags)) | |
32 if ok then | |
33 util.printout("Generating index.html for "..repo) | |
34 index.make_index(repo) | |
35 end | |
36 return ok, err | |
37 end |