Software /
code /
prosody
Comparison
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 |
comparison
equal
deleted
inserted
replaced
5988:177f233b5211 | 5989:5aaddafe0beb |
---|---|
6 -- COPYING file in the source package for more information. | 6 -- COPYING file in the source package for more information. |
7 -- | 7 -- |
8 | 8 |
9 package.path = package.path..";../?.lua"; | 9 package.path = package.path..";../?.lua"; |
10 package.cpath = package.cpath..";../?.so"; -- needed for util.pposix used in datamanager | 10 package.cpath = package.cpath..";../?.so"; -- needed for util.pposix used in datamanager |
11 | |
12 local my_name = arg[0]; | |
13 if my_name:match("[/\\]") then | |
14 package.path = package.path..";"..my_name:gsub("[^/\\]+$", "../?.lua"); | |
15 package.cpath = package.cpath..";"..my_name:gsub("[^/\\]+$", "../?.so"); | |
16 end | |
11 | 17 |
12 -- ugly workaround for getting datamanager to work outside of prosody :( | 18 -- ugly workaround for getting datamanager to work outside of prosody :( |
13 prosody = { }; | 19 prosody = { }; |
14 prosody.platform = "unknown"; | 20 prosody.platform = "unknown"; |
15 if os.getenv("WINDIR") then | 21 if os.getenv("WINDIR") then |