aboutsummaryrefslogtreecommitdiff
path: root/src/luarocks/refresh_cache.lua
diff options
context:
space:
mode:
authorhisham <hisham@9ca3f7c1-7366-0410-b1a3-b5c78f85698c>2009-10-11 04:50:20 +0000
committerhisham <hisham@9ca3f7c1-7366-0410-b1a3-b5c78f85698c>2009-10-11 04:50:20 +0000
commit6763bff3d94462167aaca8c90003255707773bcc (patch)
tree8222691e0a222d8aa11e6f779fa66862f7e4363a /src/luarocks/refresh_cache.lua
parent6faa5af7e8711a0cd3d963d47e59e1b078501411 (diff)
downloadluarocks-6763bff3d94462167aaca8c90003255707773bcc.tar.gz
luarocks-6763bff3d94462167aaca8c90003255707773bcc.tar.bz2
luarocks-6763bff3d94462167aaca8c90003255707773bcc.zip
Fix help.
git-svn-id: http://luarocks.org/svn/luarocks/trunk@79 9ca3f7c1-7366-0410-b1a3-b5c78f85698c
Diffstat (limited to '')
-rw-r--r--src/luarocks/refresh_cache.lua12
1 files changed, 10 insertions, 2 deletions
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