diff options
author | hisham <hisham@9ca3f7c1-7366-0410-b1a3-b5c78f85698c> | 2009-10-11 04:50:20 +0000 |
---|---|---|
committer | hisham <hisham@9ca3f7c1-7366-0410-b1a3-b5c78f85698c> | 2009-10-11 04:50:20 +0000 |
commit | 6763bff3d94462167aaca8c90003255707773bcc (patch) | |
tree | 8222691e0a222d8aa11e6f779fa66862f7e4363a /src/luarocks/refresh_cache.lua | |
parent | 6faa5af7e8711a0cd3d963d47e59e1b078501411 (diff) | |
download | luarocks-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.lua | 12 |
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") | |||
5 | local cfg = require("luarocks.cfg") | 5 | local cfg = require("luarocks.cfg") |
6 | local cache = require("luarocks.cache") | 6 | local cache = require("luarocks.cache") |
7 | 7 | ||
8 | help_summary = "Refresh local cache of a remote rocks server." | ||
9 | help_arguments = "[--from=<server>]" | ||
10 | help = [[ | ||
11 | The flag --from indicates which server to use. | ||
12 | If not given, the default server set in the upload_server variable | ||
13 | from the configuration file is used instead. | ||
14 | ]] | ||
15 | |||
8 | function run(...) | 16 | function 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 |