aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xep227toprosody.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
commitceff8cb313e0f2e339b6594ddbe7488df1c4b6b1 (patch)
tree278b689e21827805ce74658647d525ab99641ad3 /tools/xep227toprosody.lua
parent410ab5d97b3b3fae6755c5bd3d6d4efb0842e9ee (diff)
downloadprosody-ceff8cb313e0f2e339b6594ddbe7488df1c4b6b1.tar.gz
prosody-ceff8cb313e0f2e339b6594ddbe7488df1c4b6b1.zip
package{,c}path fixes for migration tools
Diffstat (limited to 'tools/xep227toprosody.lua')
-rwxr-xr-xtools/xep227toprosody.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/xep227toprosody.lua b/tools/xep227toprosody.lua
index b5156f45..0862b0c1 100755
--- a/tools/xep227toprosody.lua
+++ b/tools/xep227toprosody.lua
@@ -25,6 +25,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";