From 6aaabf5d4007945e92955d3eac389755e42481dd Mon Sep 17 00:00:00 2001 From: Vadim Misbakh-Soloviov Date: Fri, 14 Jun 2013 15:15:05 +0700 Subject: package{,c}path fixes for migration tools --- tools/openfire2prosody.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tools/openfire2prosody.lua') diff --git a/tools/openfire2prosody.lua b/tools/openfire2prosody.lua index bdea9a63..5ef47602 100644 --- a/tools/openfire2prosody.lua +++ b/tools/openfire2prosody.lua @@ -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"; -- cgit v1.2.3