From ffcd0f2e953e242af5de2ee4b9d52768891ed98b Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Fri, 15 Oct 2010 14:09:30 -0300 Subject: Display the name of file created by 'pack'. (Also fixes the return of the run() command.) --- src/luarocks/pack.lua | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/luarocks/pack.lua b/src/luarocks/pack.lua index e2b59a6f..5546a649 100644 --- a/src/luarocks/pack.lua +++ b/src/luarocks/pack.lua @@ -163,9 +163,16 @@ function run(...) return nil, "Argument missing, see help." end + local file, err if arg:match(".*%.rockspec") then - return pack_source_rock(arg) + file, err = pack_source_rock(arg) else - return pack_binary_rock(arg, version) + file, err = pack_binary_rock(arg, version) + end + if err then + return nil, err + else + print("Packed: "..file) + return true end end -- cgit v1.2.3-55-g6feb From 26d5503774657a09f0df68a2fabc355beffb2ac8 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Tue, 19 Oct 2010 18:27:51 -0200 Subject: Specify pattern for valid rock names --- src/luarocks/deps.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/luarocks/deps.lua b/src/luarocks/deps.lua index a2cdcf08..b10594a3 100644 --- a/src/luarocks/deps.lua +++ b/src/luarocks/deps.lua @@ -211,7 +211,7 @@ end function parse_dep(dep) assert(type(dep) == "string") - local name, rest = dep:match("^%s*(%a[%w%-]*%w)%s*(.*)") + local name, rest = dep:match("^%s*([a-zA-Z][a-zA-Z0-9%.%-%_]*)%s*(.*)") if not name then return nil end local constraints = parse_constraints(rest) if not constraints then return nil end -- cgit v1.2.3-55-g6feb From 1725c68ca1f6f4b82f3adf2d2b791091c197230a Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Fri, 22 Oct 2010 16:11:55 -0200 Subject: Improve support for win32-msys. Closes issue #3. --- src/luarocks/fs/win32/tools.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/luarocks/fs/win32/tools.lua b/src/luarocks/fs/win32/tools.lua index c3b5398e..d2613b67 100644 --- a/src/luarocks/fs/win32/tools.lua +++ b/src/luarocks/fs/win32/tools.lua @@ -246,7 +246,8 @@ function find(at) local pipe = io.popen(command_at(at, "find 2> NUL")) for file in pipe:lines() do -- Windows find is a bit different - if file:sub(1,2)==".\\" then file=file:sub(3) end + local first_two = file:sub(1,2) + if first_two == ".\\" or first_two == "./" then file=file:sub(3) end if file ~= "." then table.insert(result, (file:gsub("\\", "/"))) end -- cgit v1.2.3-55-g6feb