Comparison

util/dependencies.lua @ 5842:1a71069dcacf

Backout ae48bf828f21
author Kim Alvefur <zash@zash.se>
date Sun, 22 Sep 2013 00:37:04 +0200
parent 5830:ae48bf828f21
child 5843:fb6573e191cf
comparison
equal deleted inserted replaced
5841:1b0c7e7c6be8 5842:1a71069dcacf
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));