From 8dca0cdd3edcc740bdacfa2a5a7e2b8662c58f42 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 20 Aug 2009 16:30:03 +0100 Subject: ejabberd2prosody: More intelligent searching for erlparse library --- tools/ejabberd2prosody.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/ejabberd2prosody.lua b/tools/ejabberd2prosody.lua index 4fef3f3a..c18056c1 100755 --- a/tools/ejabberd2prosody.lua +++ b/tools/ejabberd2prosody.lua @@ -9,9 +9,14 @@ +package.path = package.path ..";../?.lua"; + +if arg[0]:match("^./") then + package.path = package.path .. ";"..arg[0]:gsub("/ejabberd2prosody.lua$", "/?.lua"); +end + require "erlparse"; -package.path = package.path ..";../?.lua"; local serialize = require "util.serialization".serialize; local st = require "util.stanza"; package.loaded["util.logger"] = {init = function() return function() end; end} -- cgit v1.2.3