diff options
| author | Ignacio Burgueño <ignaciob@inconcertcc.com> | 2015-06-26 11:59:10 -0300 |
|---|---|---|
| committer | Ignacio Burgueño <ignaciob@inconcertcc.com> | 2015-06-26 11:59:10 -0300 |
| commit | f10113ff32a1ab9fff5abe68e84ccc5bad9a4908 (patch) | |
| tree | a74d276e7ab3ef1d9ba9c148dc48b27f3e3370e1 /src | |
| parent | e1badc44a12e99ffb4820bf216f1e9cc36dbf88a (diff) | |
| download | luarocks-f10113ff32a1ab9fff5abe68e84ccc5bad9a4908.tar.gz luarocks-f10113ff32a1ab9fff5abe68e84ccc5bad9a4908.tar.bz2 luarocks-f10113ff32a1ab9fff5abe68e84ccc5bad9a4908.zip | |
Adds help to 'luarocks config' command
Diffstat (limited to 'src')
| -rw-r--r-- | src/luarocks/config_cmd.lua | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/luarocks/config_cmd.lua b/src/luarocks/config_cmd.lua index c066cfec..f3b54494 100644 --- a/src/luarocks/config_cmd.lua +++ b/src/luarocks/config_cmd.lua | |||
| @@ -6,6 +6,22 @@ local cfg = require("luarocks.cfg") | |||
| 6 | local util = require("luarocks.util") | 6 | local util = require("luarocks.util") |
| 7 | local dir = require("luarocks.dir") | 7 | local dir = require("luarocks.dir") |
| 8 | 8 | ||
| 9 | config_cmd.help_summary = "Queries information about the LuaRocks configuration." | ||
| 10 | config_cmd.help_arguments = "<flag>" | ||
| 11 | config_cmd.help = [[ | ||
| 12 | --lua-incdir Path to Lua header files. | ||
| 13 | |||
| 14 | --lua-libdir Path to Lua library files. | ||
| 15 | |||
| 16 | --lua-ver Lua version (in major.minor format). e.g. 5.1 | ||
| 17 | |||
| 18 | --system-config Location of the system config file. | ||
| 19 | |||
| 20 | --user-config Location of the user config file. | ||
| 21 | |||
| 22 | --rock-trees Rocks trees in use. First the user tree, then the system tree. | ||
| 23 | ]] | ||
| 24 | |||
| 9 | local function config_file(conf) | 25 | local function config_file(conf) |
| 10 | print(dir.normalize(conf.file)) | 26 | print(dir.normalize(conf.file)) |
| 11 | if conf.ok then | 27 | if conf.ok then |
| @@ -39,7 +55,6 @@ function config_cmd.run(...) | |||
| 39 | if flags["user-config"] then | 55 | if flags["user-config"] then |
| 40 | return config_file(conf.user) | 56 | return config_file(conf.user) |
| 41 | end | 57 | end |
| 42 | |||
| 43 | if flags["rock-trees"] then | 58 | if flags["rock-trees"] then |
| 44 | for _, tree in ipairs(cfg.rocks_trees) do | 59 | for _, tree in ipairs(cfg.rocks_trees) do |
| 45 | if type(tree) == "string" then | 60 | if type(tree) == "string" then |
