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 | |
| 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 'src')
| -rwxr-xr-x | src/bin/luarocks-admin | 1 | ||||
| -rw-r--r-- | src/luarocks/add.lua | 2 | ||||
| -rw-r--r-- | src/luarocks/refresh_cache.lua | 12 |
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 = { | |||
| 11 | commands.help = require("luarocks.help") | 11 | commands.help = require("luarocks.help") |
| 12 | commands.make_manifest = require("luarocks.make_manifest") | 12 | commands.make_manifest = require("luarocks.make_manifest") |
| 13 | commands.add = require("luarocks.add") | 13 | commands.add = require("luarocks.add") |
| 14 | commands.refresh_cache = require("luarocks.refresh_cache") | ||
| 14 | 15 | ||
| 15 | command_line.run_command(...) | 16 | command_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") | |||
| 12 | local fs = require("luarocks.fs") | 12 | local fs = require("luarocks.fs") |
| 13 | local cache = require("luarocks.cache") | 13 | local cache = require("luarocks.cache") |
| 14 | 14 | ||
| 15 | help_summary = "Add a rock or rockpec to a rocks server." | 15 | help_summary = "Add a rock or rockspec to a rocks server." |
| 16 | help_arguments = "[--to=<server>] {<rockspec>|<rock>]}" | 16 | help_arguments = "[--to=<server>] {<rockspec>|<rock>]}" |
| 17 | help = [[ | 17 | help = [[ |
| 18 | Argument may be a local rockspec or rock file. | 18 | Argument 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") | |||
| 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 |
