diff options
-rw-r--r-- | src/luarocks/admin/cmd/add.lua | 2 | ||||
-rw-r--r-- | src/luarocks/admin/cmd/make_manifest.lua | 3 | ||||
-rw-r--r-- | src/luarocks/admin/cmd/refresh_cache.lua | 3 | ||||
-rw-r--r-- | src/luarocks/admin/cmd/remove.lua | 5 | ||||
-rw-r--r-- | src/luarocks/cmd/build.lua | 3 | ||||
-rw-r--r-- | src/luarocks/cmd/config.lua | 23 | ||||
-rw-r--r-- | src/luarocks/cmd/download.lua | 7 | ||||
-rw-r--r-- | src/luarocks/cmd/write_rockspec.lua | 1 | ||||
-rw-r--r-- | src/luarocks/util.lua | 2 |
9 files changed, 21 insertions, 28 deletions
diff --git a/src/luarocks/admin/cmd/add.lua b/src/luarocks/admin/cmd/add.lua index f07b9fae..75f9386d 100644 --- a/src/luarocks/admin/cmd/add.lua +++ b/src/luarocks/admin/cmd/add.lua | |||
@@ -127,7 +127,7 @@ end | |||
127 | function add.command(args) | 127 | function add.command(args) |
128 | local server, server_table = cache.get_upload_server(args.server) | 128 | local server, server_table = cache.get_upload_server(args.server) |
129 | if not server then return nil, server_table end | 129 | if not server then return nil, server_table end |
130 | return add_files_to_server(not args.no_refresh, files, server, server_table, args.index) | 130 | return add_files_to_server(not args.no_refresh, args.rock, server, server_table, args.index) |
131 | end | 131 | end |
132 | 132 | ||
133 | 133 | ||
diff --git a/src/luarocks/admin/cmd/make_manifest.lua b/src/luarocks/admin/cmd/make_manifest.lua index 840501ba..8eb673f5 100644 --- a/src/luarocks/admin/cmd/make_manifest.lua +++ b/src/luarocks/admin/cmd/make_manifest.lua | |||
@@ -12,8 +12,7 @@ local fs = require("luarocks.fs") | |||
12 | local dir = require("luarocks.dir") | 12 | local dir = require("luarocks.dir") |
13 | 13 | ||
14 | function make_manifest.add_to_parser(parser) | 14 | function make_manifest.add_to_parser(parser) |
15 | local cmd = parser:command("make_manifest", "Compile a manifest file for a repository.", | 15 | local cmd = parser:command("make_manifest", "Compile a manifest file for a repository.", util.see_also()) |
16 | util.see_also()) | ||
17 | :add_help("--help") | 16 | :add_help("--help") |
18 | 17 | ||
19 | cmd:argument("repository", "Local repository pathname.") | 18 | cmd:argument("repository", "Local repository pathname.") |
diff --git a/src/luarocks/admin/cmd/refresh_cache.lua b/src/luarocks/admin/cmd/refresh_cache.lua index a5bdecb4..042a07a7 100644 --- a/src/luarocks/admin/cmd/refresh_cache.lua +++ b/src/luarocks/admin/cmd/refresh_cache.lua | |||
@@ -7,8 +7,7 @@ local util = require("luarocks.util") | |||
7 | local cache = require("luarocks.admin.cache") | 7 | local cache = require("luarocks.admin.cache") |
8 | 8 | ||
9 | function refresh_cache.add_to_parser(parser) | 9 | function refresh_cache.add_to_parser(parser) |
10 | local cmd = parser:command( | 10 | local cmd = parser:command("refresh_cache", "Refresh local cache of a remote rocks server.", util.see_also()) |
11 | "refresh_cache", "Refresh local cache of a remote rocks server.", util.see_also()) | ||
12 | :add_help("--help") | 11 | :add_help("--help") |
13 | 12 | ||
14 | cmd:option("--from", "The server to use. If not given, the default server ".. | 13 | cmd:option("--from", "The server to use. If not given, the default server ".. |
diff --git a/src/luarocks/admin/cmd/remove.lua b/src/luarocks/admin/cmd/remove.lua index b730ca51..74432ce9 100644 --- a/src/luarocks/admin/cmd/remove.lua +++ b/src/luarocks/admin/cmd/remove.lua | |||
@@ -12,8 +12,7 @@ local cache = require("luarocks.admin.cache") | |||
12 | local index = require("luarocks.admin.index") | 12 | local index = require("luarocks.admin.index") |
13 | 13 | ||
14 | function admin_remove.add_to_parser(parser) | 14 | function admin_remove.add_to_parser(parser) |
15 | local cmd = parser:command( | 15 | local cmd = parser:command("remove", "Remove a rock or rockspec from a rocks server.", util.see_also()) |
16 | "remove", "Remove a rock or rockspec from a rocks server.", util.see_also()) | ||
17 | :add_help("--help") | 16 | :add_help("--help") |
18 | 17 | ||
19 | cmd:argument("rock", "A local rockspec or rock file.") | 18 | cmd:argument("rock", "A local rockspec or rock file.") |
@@ -82,7 +81,7 @@ end | |||
82 | function admin_remove.command(args) | 81 | function admin_remove.command(args) |
83 | local server, server_table = cache.get_upload_server(args.server) | 82 | local server, server_table = cache.get_upload_server(args.server) |
84 | if not server then return nil, server_table end | 83 | if not server then return nil, server_table end |
85 | return remove_files_from_server(not args.no_refresh, files, server, server_table) | 84 | return remove_files_from_server(not args.no_refresh, args.rock, server, server_table) |
86 | end | 85 | end |
87 | 86 | ||
88 | 87 | ||
diff --git a/src/luarocks/cmd/build.lua b/src/luarocks/cmd/build.lua index ea75fa3d..09e0abc7 100644 --- a/src/luarocks/cmd/build.lua +++ b/src/luarocks/cmd/build.lua | |||
@@ -19,8 +19,7 @@ local make = require("luarocks.cmd.make") | |||
19 | local cmd = require("luarocks.cmd") | 19 | local cmd = require("luarocks.cmd") |
20 | 20 | ||
21 | function cmd_build.add_to_parser(parser) | 21 | function cmd_build.add_to_parser(parser) |
22 | local cmd = parser:command("build", "Build and install a rock, compiling ".. | 22 | local cmd = parser:command("build", "Build and install a rock, compiling its C parts if any.", util.see_also()) |
23 | "its C parts if any.", util.see_also()) | ||
24 | :summary("Build/compile a rock.") | 23 | :summary("Build/compile a rock.") |
25 | :add_help("--help") | 24 | :add_help("--help") |
26 | 25 | ||
diff --git a/src/luarocks/cmd/config.lua b/src/luarocks/cmd/config.lua index 9177c50d..0af9e247 100644 --- a/src/luarocks/cmd/config.lua +++ b/src/luarocks/cmd/config.lua | |||
@@ -13,18 +13,18 @@ function config_cmd.add_to_parser(parser) | |||
13 | local cmd = parser:command("config", [[ | 13 | local cmd = parser:command("config", [[ |
14 | Query information about the LuaRocks configuration. | 14 | Query information about the LuaRocks configuration. |
15 | 15 | ||
16 | * When given a configuration key, it prints the value of that key | 16 | * When given a configuration key, it prints the value of that key according to |
17 | according to the currently active configuration (taking into account | 17 | the currently active configuration (taking into account all config files and |
18 | all config files and any command-line flags passed) | 18 | any command-line flags passed) |
19 | 19 | ||
20 | Examples: | 20 | Examples: |
21 | luarocks config lua_interpreter | 21 | luarocks config lua_interpreter |
22 | luarocks config variables.LUA_INCDIR | 22 | luarocks config variables.LUA_INCDIR |
23 | luarocks config lua_version | 23 | luarocks config lua_version |
24 | 24 | ||
25 | * When given a configuration key and a value, | 25 | * When given a configuration key and a value, it overwrites the config file (see |
26 | it overwrites the config file (see the --scope option below to determine which) | 26 | the --scope option below to determine which) and replaces the value of the |
27 | and replaces the value of the given key with the given value. | 27 | given key with the given value. |
28 | 28 | ||
29 | * `lua_dir` is a special key as it checks for a valid Lua installation | 29 | * `lua_dir` is a special key as it checks for a valid Lua installation |
30 | (equivalent to --lua-dir) and sets several keys at once. | 30 | (equivalent to --lua-dir) and sets several keys at once. |
@@ -36,15 +36,14 @@ Query information about the LuaRocks configuration. | |||
36 | luarocks config lua_dir /usr/local | 36 | luarocks config lua_dir /usr/local |
37 | luarocks config lua_version 5.3 | 37 | luarocks config lua_version 5.3 |
38 | 38 | ||
39 | * When given a configuration key and --unset, | 39 | * When given a configuration key and --unset, it overwrites the config file (see |
40 | it overwrites the config file (see the --scope option below to determine which) | 40 | the --scope option below to determine which) and deletes that key from the |
41 | and deletes that key from the file. | 41 | file. |
42 | 42 | ||
43 | Example: luarocks config variables.OPENSSL_DIR --unset | 43 | Example: luarocks config variables.OPENSSL_DIR --unset |
44 | 44 | ||
45 | * When given no arguments, it prints the entire currently active | 45 | * When given no arguments, it prints the entire currently active configuration, |
46 | configuration, resulting from reading the config files from | 46 | resulting from reading the config files from all scopes. |
47 | all scopes. | ||
48 | 47 | ||
49 | Example: luarocks config]], util.see_also([[ | 48 | Example: luarocks config]], util.see_also([[ |
50 | https://github.com/luarocks/luarocks/wiki/Config-file-format | 49 | https://github.com/luarocks/luarocks/wiki/Config-file-format |
diff --git a/src/luarocks/cmd/download.lua b/src/luarocks/cmd/download.lua index 76acc9a5..7f12a35f 100644 --- a/src/luarocks/cmd/download.lua +++ b/src/luarocks/cmd/download.lua | |||
@@ -7,8 +7,7 @@ local util = require("luarocks.util") | |||
7 | local download = require("luarocks.download") | 7 | local download = require("luarocks.download") |
8 | 8 | ||
9 | function cmd_download.add_to_parser(parser) | 9 | function cmd_download.add_to_parser(parser) |
10 | local cmd = parser:command( | 10 | local cmd = parser:command("download", "Download a specific rock file from a rocks server.", util.see_also()) |
11 | "download", "Download a specific rock file from a rocks server.", util.see_also()) | ||
12 | :add_help("--help") | 11 | :add_help("--help") |
13 | 12 | ||
14 | cmd:argument("name", "Name of the rock.") | 13 | cmd:argument("name", "Name of the rock.") |
@@ -33,7 +32,7 @@ function cmd_download.command(args) | |||
33 | 32 | ||
34 | local name = util.adjust_name_and_namespace(args.name, args) | 33 | local name = util.adjust_name_and_namespace(args.name, args) |
35 | 34 | ||
36 | if not name then name, version = "", "" end | 35 | if not name then name, args.version = "", "" end |
37 | 36 | ||
38 | local arch | 37 | local arch |
39 | 38 | ||
@@ -45,7 +44,7 @@ function cmd_download.command(args) | |||
45 | arch = args.arch | 44 | arch = args.arch |
46 | end | 45 | end |
47 | 46 | ||
48 | local dl, err = download.download(arch, name:lower(), version, args.all) | 47 | local dl, err = download.download(arch, name:lower(), args.version, args.all) |
49 | return dl and true, err | 48 | return dl and true, err |
50 | end | 49 | end |
51 | 50 | ||
diff --git a/src/luarocks/cmd/write_rockspec.lua b/src/luarocks/cmd/write_rockspec.lua index 3895a7f8..3fdc8091 100644 --- a/src/luarocks/cmd/write_rockspec.lua +++ b/src/luarocks/cmd/write_rockspec.lua | |||
@@ -54,7 +54,6 @@ This command writes an initial version of a rockspec file, | |||
54 | based on a name, a version, and a location (an URL or a local path). | 54 | based on a name, a version, and a location (an URL or a local path). |
55 | If only two arguments are given, the first one is considered the name and the | 55 | If only two arguments are given, the first one is considered the name and the |
56 | second one is the location. | 56 | second one is the location. |
57 | |||
58 | If only one argument is given, it must be the location. | 57 | If only one argument is given, it must be the location. |
59 | If no arguments are given, current directory is used as the location. | 58 | If no arguments are given, current directory is used as the location. |
60 | LuaRocks will attempt to infer name and version if not given, | 59 | LuaRocks will attempt to infer name and version if not given, |
diff --git a/src/luarocks/util.lua b/src/luarocks/util.lua index 5df2df51..42523c3c 100644 --- a/src/luarocks/util.lua +++ b/src/luarocks/util.lua | |||
@@ -215,7 +215,7 @@ function util.this_program(default) | |||
215 | return prog | 215 | return prog |
216 | end | 216 | end |
217 | 217 | ||
218 | function util.deps_mode_option(parser) | 218 | function util.deps_mode_option(parser, program) |
219 | local cfg = require("luarocks.core.cfg") | 219 | local cfg = require("luarocks.core.cfg") |
220 | 220 | ||
221 | parser:option("--deps-mode", "How to handle dependencies. Four modes are supported:\n".. | 221 | parser:option("--deps-mode", "How to handle dependencies. Four modes are supported:\n".. |