aboutsummaryrefslogtreecommitdiffstats
path: root/tools/ejabberd2prosody.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
commit2489f372db5f8d584c537ba31844cdaf8fd19b10 (patch)
tree27741db74d498be76001287c8a4e6a9076bb5a27 /tools/ejabberd2prosody.lua
parent5adcad1a43d110e0458b38c42b0a21a70eb5336e (diff)
parent82bd1a5967eba247d95ddde8d8d77197b2bada91 (diff)
downloadprosody-2489f372db5f8d584c537ba31844cdaf8fd19b10.tar.gz
prosody-2489f372db5f8d584c537ba31844cdaf8fd19b10.zip
Merge
Diffstat (limited to 'tools/ejabberd2prosody.lua')
-rwxr-xr-xtools/ejabberd2prosody.lua11
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/ejabberd2prosody.lua b/tools/ejabberd2prosody.lua
index c11e41d9..ff3004c2 100755
--- a/tools/ejabberd2prosody.lua
+++ b/tools/ejabberd2prosody.lua
@@ -11,8 +11,11 @@
package.path = package.path ..";../?.lua";
-if arg[0]:match("[/\\]") then
- package.path = package.path .. ";"..arg[0]:gsub("[^/\\]*$", "?.lua");
+local my_name = arg[0];
+if my_name:match("[/\\]") then
+ package.path = package.path..";"..my_name:gsub("[^/\\]+$", "../?.lua");
+ package.path = package.path..";"..my_name:gsub("[^/\\]+$", "?.lua");
+ package.cpath = package.cpath..";"..my_name:gsub("[^/\\]+$", "../?.so");
end
local erlparse = require "erlparse";
@@ -229,10 +232,10 @@ local help = "/? -? ? /h -h /help -help --help";
if not arg or help:find(arg, 1, true) then
print([[ejabberd db dump importer for Prosody
- Usage: ejabberd2prosody.lua filename.txt
+ Usage: ]]..my_name..[[ filename.txt
The file can be generated from ejabberd using:
- sudo ./bin/ejabberdctl dump filename.txt
+ sudo ejabberdctl dump filename.txt
Note: The path of ejabberdctl depends on your ejabberd installation, and ejabberd needs to be running for ejabberdctl to work.]]);
os.exit(1);