aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-08-20 16:30:03 +0100
committerMatthew Wild <mwild1@gmail.com>2009-08-20 16:30:03 +0100
commit8dca0cdd3edcc740bdacfa2a5a7e2b8662c58f42 (patch)
tree9feb95be943d73753eafcada8a7b2958733dbb67 /tools
parent7f7d80a4e808d80f0f0f92dd965b5a4f8dfa051a (diff)
downloadprosody-8dca0cdd3edcc740bdacfa2a5a7e2b8662c58f42.tar.gz
prosody-8dca0cdd3edcc740bdacfa2a5a7e2b8662c58f42.zip
ejabberd2prosody: More intelligent searching for erlparse library
Diffstat (limited to 'tools')
-rwxr-xr-xtools/ejabberd2prosody.lua7
1 files changed, 6 insertions, 1 deletions
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}