aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2012-02-10 15:58:05 -0200
committerHisham Muhammad <hisham@gobolinux.org>2012-02-10 15:58:05 -0200
commitc0db1956f4b6505ba5e82d66be1d83e3dbd50052 (patch)
tree509451d6f130c003eeb750ebe15897df5c3617b4 /src
parent085cd302c5abcf71fea267cf041b0d28e1112bb8 (diff)
downloadluarocks-c0db1956f4b6505ba5e82d66be1d83e3dbd50052.tar.gz
luarocks-c0db1956f4b6505ba5e82d66be1d83e3dbd50052.tar.bz2
luarocks-c0db1956f4b6505ba5e82d66be1d83e3dbd50052.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/luarocks/build/builtin.lua2
1 files changed, 1 insertions, 1 deletions
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)
187 if type(info) == "string" then 187 if type(info) == "string" then
188 local ext = info:match(".([^.]+)$") 188 local ext = info:match(".([^.]+)$")
189 if ext == "lua" then 189 if ext == "lua" then
190 if info:match("init.lua$") then 190 if info:match("init%.lua$") and not name:match("%.init$") then
191 moddir = path.module_to_path(name..".init") 191 moddir = path.module_to_path(name..".init")
192 end 192 end
193 local dest = dir.path(luadir, moddir) 193 local dest = dir.path(luadir, moddir)