configmanager: Rename unused function arguments [luacheck]
[prosody.git] / tools / openfire2prosody.lua
index bdea9a6301b271b3a390276f91e943b0cf24ff32..cd3e62e5d850ed8b71c35fd8e7c2e11c39163fc6 100644 (file)
@@ -1,7 +1,7 @@
 #!/usr/bin/env lua
 -- Prosody IM
 -- Copyright (C) 2008-2009 Waqas Hussain
--- 
+--
 -- This project is MIT/X11 licensed. Please see the
 -- COPYING file in the source package for more information.
 --
@@ -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";