Software /
code /
prosody
Diff
tools/ejabberd2prosody.lua @ 5720:449399a7e136
Merge
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 29 Jun 2013 14:45:47 +0100 |
parent | 5697:956df0f1cb70 |
child | 5776:bd0ff8ae98a8 |
child | 5992:72157e928c23 |
line wrap: on
line diff
--- a/tools/ejabberd2prosody.lua Sat Jun 29 14:45:38 2013 +0100 +++ b/tools/ejabberd2prosody.lua Sat Jun 29 14:45:47 2013 +0100 @@ -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 @@ 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);