From c0db1956f4b6505ba5e82d66be1d83e3dbd50052 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Fri, 10 Feb 2012 15:58:05 -0200 Subject: Handle both styles of syntax for init module declarations. That is, both explicit init: ['lxsh.init'] = 'src/init.lua' and implicit init: ["pl"] = "lua/pl/init.lua" Closes #56. --- src/luarocks/build/builtin.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/luarocks/build/builtin.lua b/src/luarocks/build/builtin.lua index 2a18286f..c2bb0106 100644 --- a/src/luarocks/build/builtin.lua +++ b/src/luarocks/build/builtin.lua @@ -187,7 +187,7 @@ function run(rockspec) if type(info) == "string" then local ext = info:match(".([^.]+)$") if ext == "lua" then - if info:match("init.lua$") then + if info:match("init%.lua$") and not name:match("%.init$") then moddir = path.module_to_path(name..".init") end local dest = dir.path(luadir, moddir) -- cgit v1.2.3-55-g6feb