util/dependencies.lua

changeset 2513
a8aa7616b154
parent 2510
97b5ea975cb9
child 2562
f321211978f6
equal deleted inserted replaced
2512:d04b0eeeb954 2513:a8aa7616b154
7 -- 7 --
8 8
9 module("dependencies", package.seeall) 9 module("dependencies", package.seeall)
10 10
11 function softreq(...) local ok, lib = pcall(require, ...); if ok then return lib; else return nil, lib; end end 11 function softreq(...) local ok, lib = pcall(require, ...); if ok then return lib; else return nil, lib; end end
12
13 -- Required to be able to find packages installed with luarocks
14 if not softreq "luarocks.loader" then -- LuaRocks 2.x
15 softreq "luarocks.require"; -- LuaRocks <1.x
16 end
12 17
13 function missingdep(name, sources, msg) 18 function missingdep(name, sources, msg)
14 print(""); 19 print("");
15 print("**************************"); 20 print("**************************");
16 print("Prosody was unable to find "..tostring(name)); 21 print("Prosody was unable to find "..tostring(name));

mercurial