aboutsummaryrefslogtreecommitdiffstats
path: root/tools/openfire2prosody.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
commit876969b5458ddfadf2e4702b2e999fbfddfc065f (patch)
tree278b689e21827805ce74658647d525ab99641ad3 /tools/openfire2prosody.lua
parentad7e898be12b8592c20b0ee92f614c23f97de2b9 (diff)
downloadprosody-876969b5458ddfadf2e4702b2e999fbfddfc065f.tar.gz
prosody-876969b5458ddfadf2e4702b2e999fbfddfc065f.zip
package{,c}path fixes for migration tools
Diffstat (limited to 'tools/openfire2prosody.lua')
-rw-r--r--tools/openfire2prosody.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/openfire2prosody.lua b/tools/openfire2prosody.lua
index bdea9a63..5ef47602 100644
--- a/tools/openfire2prosody.lua
+++ b/tools/openfire2prosody.lua
@@ -9,6 +9,12 @@
package.path = package.path..";../?.lua";
package.cpath = package.cpath..";../?.so"; -- needed for util.pposix used in datamanager
+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
+
-- ugly workaround for getting datamanager to work outside of prosody :(
prosody = { };
prosody.platform = "unknown";