Software /
code /
prosody
Diff
tools/xep227toprosody.lua @ 5696:9fba74a28e0c
package{,c}path fixes for migration tools
author | Vadim Misbakh-Soloviov <mva@mva.name> |
---|---|
date | Fri, 14 Jun 2013 15:15:05 +0700 |
parent | 5091:dbc483d06a07 |
child | 5776:bd0ff8ae98a8 |
child | 6869:5ce783c37024 |
line wrap: on
line diff
--- a/tools/xep227toprosody.lua Thu Jun 13 23:24:36 2013 +0100 +++ b/tools/xep227toprosody.lua Fri Jun 14 15:15:05 2013 +0700 @@ -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";