aboutsummaryrefslogtreecommitdiffstats
path: root/tools/ejabberdsql2prosody.lua
diff options
context:
space:
mode:
authorVadim Misbakh-Soloviov <mva@mva.name>2013-06-14 15:15:05 +0700
committerVadim Misbakh-Soloviov <mva@mva.name>2013-06-14 15:15:05 +0700
commit6aaabf5d4007945e92955d3eac389755e42481dd (patch)
tree278b689e21827805ce74658647d525ab99641ad3 /tools/ejabberdsql2prosody.lua
parent6e4e7abe94a248163cda21ff2d9ff9b81087284f (diff)
downloadprosody-6aaabf5d4007945e92955d3eac389755e42481dd.tar.gz
prosody-6aaabf5d4007945e92955d3eac389755e42481dd.zip
package{,c}path fixes for migration tools
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;