aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/bin/luarocks-admin1
-rw-r--r--src/luarocks/add.lua2
-rw-r--r--src/luarocks/refresh_cache.lua12
3 files changed, 12 insertions, 3 deletions
diff --git a/src/bin/luarocks-admin b/src/bin/luarocks-admin
index c35e8b93..6e528cd9 100755
--- a/src/bin/luarocks-admin
+++ b/src/bin/luarocks-admin
@@ -11,5 +11,6 @@ commands = {
11commands.help = require("luarocks.help") 11commands.help = require("luarocks.help")
12commands.make_manifest = require("luarocks.make_manifest") 12commands.make_manifest = require("luarocks.make_manifest")
13commands.add = require("luarocks.add") 13commands.add = require("luarocks.add")
14commands.refresh_cache = require("luarocks.refresh_cache")
14 15
15command_line.run_command(...) 16command_line.run_command(...)
diff --git a/src/luarocks/add.lua b/src/luarocks/add.lua
index 11e4048b..ecfdac60 100644
--- a/src/luarocks/add.lua
+++ b/src/luarocks/add.lua
@@ -12,7 +12,7 @@ local index = require("luarocks.index")
12local fs = require("luarocks.fs") 12local fs = require("luarocks.fs")
13local cache = require("luarocks.cache") 13local cache = require("luarocks.cache")
14 14
15help_summary = "Add a rock or rockpec to a rocks server." 15help_summary = "Add a rock or rockspec to a rocks server."
16help_arguments = "[--to=<server>] {<rockspec>|<rock>]}" 16help_arguments = "[--to=<server>] {<rockspec>|<rock>]}"
17help = [[ 17help = [[
18Argument may be a local rockspec or rock file. 18Argument may be a local rockspec or rock file.
diff --git a/src/luarocks/refresh_cache.lua b/src/luarocks/refresh_cache.lua
index 91a78a7f..5cf87380 100644
--- a/src/luarocks/refresh_cache.lua
+++ b/src/luarocks/refresh_cache.lua
@@ -5,12 +5,20 @@ local util = require("luarocks.util")
5local cfg = require("luarocks.cfg") 5local cfg = require("luarocks.cfg")
6local cache = require("luarocks.cache") 6local cache = require("luarocks.cache")
7 7
8help_summary = "Refresh local cache of a remote rocks server."
9help_arguments = "[--from=<server>]"
10help = [[
11The flag --from indicates which server to use.
12If not given, the default server set in the upload_server variable
13from the configuration file is used instead.
14]]
15
8function run(...) 16function run(...)
9 local flags = util.parse_flags(...) 17 local flags = util.parse_flags(...)
10 local server = flags["to"] 18 local server = flags["from"]
11 if not server then server = cfg.upload_server end 19 if not server then server = cfg.upload_server end
12 if not server then 20 if not server then
13 return nil, "No server specified with --to and no default configured with upload_server." 21 return nil, "No server specified with --from and no default configured with upload_server."
14 end 22 end
15 if cfg.upload_aliases then 23 if cfg.upload_aliases then
16 server = cfg.upload_aliases[server] or server 24 server = cfg.upload_aliases[server] or server