mirror of
https://github.com/bjc/prosody.git
synced 2025-04-01 20:27:39 +03:00
Actually `hg mv`-ing all the files is disruptive, basically breaking everything from rebasing all my WIP draft commits to the package building. So instead, what if we didn't and instead rewrote package names as they are `require()`-d? Debian packages produced by the Prosody are already installed into this structure so much will Just Work if all require calls are updated.
9 lines
238 B
Lua
9 lines
238 B
Lua
for i = #package.searchers, 1, -1 do
|
|
local search = package.searchers[i];
|
|
table.insert(package.searchers, i, function(module_name)
|
|
local lib = module_name:match("^prosody%.(.*)$");
|
|
if lib then
|
|
return search(lib);
|
|
end
|
|
end)
|
|
end
|