Comparison

util/dependencies.lua @ 5830:ae48bf828f21

Run with own LuaSec.
author Tobias Markmann <tm@ayena.de>
date Mon, 17 Jan 2011 16:50:21 +0100
parent 3904:f93163081b3c
child 5842:1a71069dcacf
comparison
equal deleted inserted replaced
5829:40c16475194e 5830:ae48bf828f21
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 12
13 -- Required to be able to find packages installed with luarocks 13 -- Required to be able to find packages installed with luarocks
14 if not softreq "luarocks.loader" then -- LuaRocks 2.x 14 --if not softreq "luarocks.loader" then -- LuaRocks 2.x
15 softreq "luarocks.require"; -- LuaRocks <1.x 15 -- softreq "luarocks.require"; -- LuaRocks <1.x
16 end 16 --end
17 17
18 function missingdep(name, sources, msg) 18 function missingdep(name, sources, msg)
19 print(""); 19 print("");
20 print("**************************"); 20 print("**************************");
21 print("Prosody was unable to find "..tostring(name)); 21 print("Prosody was unable to find "..tostring(name));