Changeset

1726:85518cb866dd

ejabberd2prosody: More intelligent searching for erlparse library
author Matthew Wild <mwild1@gmail.com>
date Thu, 20 Aug 2009 16:30:03 +0100
parents 1724:7682a34c13d0
children 1727:cbdc7bf61e0f 1730:f4170bc82969
files tools/ejabberd2prosody.lua
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tools/ejabberd2prosody.lua	Thu Aug 20 04:15:41 2009 +0100
+++ b/tools/ejabberd2prosody.lua	Thu Aug 20 16:30:03 2009 +0100
@@ -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}