aboutsummaryrefslogtreecommitdiffstats
path: root/tools/ejabberdsql2prosody.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tools/ejabberdsql2prosody.lua')
-rw-r--r--tools/ejabberdsql2prosody.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/ejabberdsql2prosody.lua b/tools/ejabberdsql2prosody.lua
index 43720643..930d5a6b 100644
--- a/tools/ejabberdsql2prosody.lua
+++ b/tools/ejabberdsql2prosody.lua
@@ -2,7 +2,7 @@
-- Prosody IM
-- Copyright (C) 2008-2010 Matthew Wild
-- Copyright (C) 2008-2010 Waqas Hussain
---
+--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--
@@ -10,6 +10,14 @@
prosody = {};
package.path = package.path ..";../?.lua";
+
+local my_name = arg[0];
+if my_name:match("[/\\]") then
+ package.path = package.path..";"..my_name:gsub("[^/\\]+$", "../?.lua");
+ package.cpath = package.cpath..";"..my_name:gsub("[^/\\]+$", "../?.so");
+end
+
+
local serialize = require "util.serialization".serialize;
local st = require "util.stanza";
local parse_xml = require "util.xml".parse;