~ubuntu-branches/ubuntu/vivid/luarocks/vivid-proposed

« back to all changes in this revision

Viewing changes to src/luarocks/refresh_cache.lua

  • Committer: Package Import Robot
  • Author(s): Enrico Tassi
  • Date: 2014-10-11 15:26:47 UTC
  • mfrom: (1.2.6)
  • Revision ID: package-import@ubuntu.com-20141011152647-bkfciayfdz6elvv3
Tags: 2.2.0+dfsg-1
* New upstream release
* patch 0001-Fixed-detection-of-Debian-paths removed (applied upstream)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
 
2
2
--- Module implementing the luarocks-admin "refresh_cache" command.
3
 
module("luarocks.refresh_cache", package.seeall)
 
3
--module("luarocks.refresh_cache", package.seeall)
 
4
local refresh_cache = {}
 
5
package.loaded["luarocks.refresh_cache"] = refresh_cache
4
6
 
5
7
local util = require("luarocks.util")
6
8
local cfg = require("luarocks.cfg")
7
9
local cache = require("luarocks.cache")
8
10
 
9
 
help_summary = "Refresh local cache of a remote rocks server."
10
 
help_arguments = "[--from=<server>]"
11
 
help = [[
 
11
refresh_cache.help_summary = "Refresh local cache of a remote rocks server."
 
12
refresh_cache.help_arguments = "[--from=<server>]"
 
13
refresh_cache.help = [[
12
14
The flag --from indicates which server to use.
13
15
If not given, the default server set in the upload_server variable
14
16
from the configuration file is used instead.
15
17
]]
16
18
 
17
 
function run(...)
 
19
function refresh_cache.run(...)
18
20
   local flags = util.parse_flags(...)
19
21
   local server, upload_server = cache.get_upload_server(flags["server"])
20
22
   if not server then return nil, upload_server end
28
30
   end
29
31
end
30
32
 
 
33
 
 
34
return refresh_cache