diff options
author | Vadim Misbakh-Soloviov <mva@mva.name> | 2013-06-14 15:15:05 +0700 |
---|---|---|
committer | Vadim Misbakh-Soloviov <mva@mva.name> | 2013-06-14 15:15:05 +0700 |
commit | 6aaabf5d4007945e92955d3eac389755e42481dd (patch) | |
tree | 278b689e21827805ce74658647d525ab99641ad3 /tools/ejabberd2prosody.lua | |
parent | 6e4e7abe94a248163cda21ff2d9ff9b81087284f (diff) | |
download | prosody-6aaabf5d4007945e92955d3eac389755e42481dd.tar.gz prosody-6aaabf5d4007945e92955d3eac389755e42481dd.zip |
package{,c}path fixes for migration tools
Diffstat (limited to 'tools/ejabberd2prosody.lua')
-rwxr-xr-x | tools/ejabberd2prosody.lua | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/ejabberd2prosody.lua b/tools/ejabberd2prosody.lua index c11e41d9..941bd4d5 100755 --- a/tools/ejabberd2prosody.lua +++ b/tools/ejabberd2prosody.lua @@ -11,8 +11,10 @@ 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.cpath = package.cpath..";"..my_name:gsub("[^/\\]+$", "../?.so"); end local erlparse = require "erlparse"; @@ -229,10 +231,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); |