aboutsummaryrefslogtreecommitdiffstats
path: root/tools/ejabberdsql2prosody.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2013-06-29 14:45:47 +0100
committerMatthew Wild <mwild1@gmail.com>2013-06-29 14:45:47 +0100
commit1ff17bd2f363d64e96b5f55c40da0768eb2931a0 (patch)
tree27741db74d498be76001287c8a4e6a9076bb5a27 /tools/ejabberdsql2prosody.lua
parentd9d3fda27d4cbd522bbf2b53bb22c7659020a0c7 (diff)
parent237fbdb8e53b39063c1df36d94f59695d80c2de2 (diff)
downloadprosody-1ff17bd2f363d64e96b5f55c40da0768eb2931a0.tar.gz
prosody-1ff17bd2f363d64e96b5f55c40da0768eb2931a0.zip
Merge
Diffstat (limited to 'tools/ejabberdsql2prosody.lua')
-rw-r--r--tools/ejabberdsql2prosody.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/ejabberdsql2prosody.lua b/tools/ejabberdsql2prosody.lua
index 43720643..d80b9e46 100644
--- a/tools/ejabberdsql2prosody.lua
+++ b/tools/ejabberdsql2prosody.lua
@@ -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;