Software /
code /
prosody
Diff
tools/openfire2prosody.lua @ 5989:5aaddafe0beb
package{,c}path fixes for migration tools
author | Vadim Misbakh-Soloviov <mva@mva.name> |
---|---|
date | Fri, 14 Jun 2013 15:15:05 +0700 |
parent | 5217:f2becd36d1d0 |
child | 5776:bd0ff8ae98a8 |
line wrap: on
line diff
--- a/tools/openfire2prosody.lua Wed Jan 15 22:47:50 2014 +0100 +++ b/tools/openfire2prosody.lua Fri Jun 14 15:15:05 2013 +0700 @@ -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";