aboutsummaryrefslogtreecommitdiffstats
path: root/tools/jabberd14sql2prosody.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
commit1d84f429784a905c94debc5aa963b7d15a60a22e (patch)
tree278b689e21827805ce74658647d525ab99641ad3 /tools/jabberd14sql2prosody.lua
parent2fce4f22048f409b93a0e3cc7fee58e6d30086fe (diff)
downloadprosody-1d84f429784a905c94debc5aa963b7d15a60a22e.tar.gz
prosody-1d84f429784a905c94debc5aa963b7d15a60a22e.zip
package{,c}path fixes for migration tools
Diffstat (limited to 'tools/jabberd14sql2prosody.lua')
-rw-r--r--tools/jabberd14sql2prosody.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/jabberd14sql2prosody.lua b/tools/jabberd14sql2prosody.lua
index b85d2c20..d6a6753f 100644
--- a/tools/jabberd14sql2prosody.lua
+++ b/tools/jabberd14sql2prosody.lua
@@ -428,7 +428,14 @@ end
end
-- import modules
-package.path = [[C:\Documents and Settings\Waqas\Desktop\mercurial\prosody-hg\?.lua;]]..package.path;
+package.path = package.path.."..\?.lua;";
+
+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 = { };