Comparison

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
comparison
equal deleted inserted replaced
5695:460070c84eae 5696:9fba74a28e0c
22 -- mod_privacy uses dm.load(username, host, "privacy"); and stores stanzas 1:1 22 -- mod_privacy uses dm.load(username, host, "privacy"); and stores stanzas 1:1
23 -- Incoming Subscription Requests : supported 23 -- Incoming Subscription Requests : supported
24 24
25 package.path = package.path..";../?.lua"; 25 package.path = package.path..";../?.lua";
26 package.cpath = package.cpath..";../?.so"; -- needed for util.pposix used in datamanager 26 package.cpath = package.cpath..";../?.so"; -- needed for util.pposix used in datamanager
27
28 local my_name = arg[0];
29 if my_name:match("[/\\]") then
30 package.path = package.path..";"..my_name:gsub("[^/\\]+$", "../?.lua");
31 package.cpath = package.cpath..";"..my_name:gsub("[^/\\]+$", "../?.so");
32 end
27 33
28 -- ugly workaround for getting datamanager to work outside of prosody :( 34 -- ugly workaround for getting datamanager to work outside of prosody :(
29 prosody = { }; 35 prosody = { };
30 prosody.platform = "unknown"; 36 prosody.platform = "unknown";
31 if os.getenv("WINDIR") then 37 if os.getenv("WINDIR") then