diff options
-rw-r--r-- | src/luarocks/build/builtin.lua | 14 | ||||
-rw-r--r-- | src/luarocks/fs/lua.lua | 1 | ||||
-rw-r--r-- | src/luarocks/fs/win32/tools.lua | 9 | ||||
-rw-r--r-- | src/luarocks/new_version.lua | 6 |
4 files changed, 14 insertions, 16 deletions
diff --git a/src/luarocks/build/builtin.lua b/src/luarocks/build/builtin.lua index 853b0361..96ce35a6 100644 --- a/src/luarocks/build/builtin.lua +++ b/src/luarocks/build/builtin.lua | |||
@@ -230,12 +230,14 @@ function run(rockspec) | |||
230 | end | 230 | end |
231 | end | 231 | end |
232 | end | 232 | end |
233 | for name, dest in pairs(built_modules) do | 233 | if ok then |
234 | fs.make_dir(dest) | 234 | for name, dest in pairs(built_modules) do |
235 | ok = fs.copy(name, dest) | 235 | fs.make_dir(dest) |
236 | if not ok then | 236 | ok = fs.copy(name, dest) |
237 | err = "Failed installing "..name.." in "..dest | 237 | if not ok then |
238 | break | 238 | err = "Failed installing "..name.." in "..dest |
239 | break | ||
240 | end | ||
239 | end | 241 | end |
240 | end | 242 | end |
241 | if ok then | 243 | if ok then |
diff --git a/src/luarocks/fs/lua.lua b/src/luarocks/fs/lua.lua index d6795773..36b33690 100644 --- a/src/luarocks/fs/lua.lua +++ b/src/luarocks/fs/lua.lua | |||
@@ -129,6 +129,7 @@ if lfs_ok then | |||
129 | -- @return boolean: true if command succeeds (status code 0), false | 129 | -- @return boolean: true if command succeeds (status code 0), false |
130 | -- otherwise. | 130 | -- otherwise. |
131 | function execute_string(cmd) | 131 | function execute_string(cmd) |
132 | if cfg.verbose then print("Executing: "..cmd) end | ||
132 | local code = os.execute(cmd) | 133 | local code = os.execute(cmd) |
133 | if code == 0 or code == true then | 134 | if code == 0 or code == true then |
134 | return true | 135 | return true |
diff --git a/src/luarocks/fs/win32/tools.lua b/src/luarocks/fs/win32/tools.lua index e32b8280..eabf125e 100644 --- a/src/luarocks/fs/win32/tools.lua +++ b/src/luarocks/fs/win32/tools.lua | |||
@@ -4,11 +4,6 @@ | |||
4 | -- used by this module. | 4 | -- used by this module. |
5 | module("luarocks.fs.win32.tools", package.seeall) | 5 | module("luarocks.fs.win32.tools", package.seeall) |
6 | 6 | ||
7 | |||
8 | --uncomment following line to make executed commands and results visible | ||
9 | --TODO: make commandline option | ||
10 | --local verbose = true | ||
11 | |||
12 | local fs = require("luarocks.fs") | 7 | local fs = require("luarocks.fs") |
13 | local dir = require("luarocks.dir") | 8 | local dir = require("luarocks.dir") |
14 | local cfg = require("luarocks.cfg") | 9 | local cfg = require("luarocks.cfg") |
@@ -61,9 +56,9 @@ end | |||
61 | -- otherwise. | 56 | -- otherwise. |
62 | function execute_string(cmd) | 57 | function execute_string(cmd) |
63 | cmd = command_at(fs.current_dir(), cmd) | 58 | cmd = command_at(fs.current_dir(), cmd) |
64 | if verbose then print("Executing: "..tostring(cmd)) end | 59 | if cfg.verbose then print("Executing: "..tostring(cmd) end |
65 | local code = pack(os.execute(cmd)) | 60 | local code = pack(os.execute(cmd)) |
66 | if verbose then | 61 | if cfg.verbose then |
67 | print("Results: "..tostring(code.n)) | 62 | print("Results: "..tostring(code.n)) |
68 | for i = 1,code.n do | 63 | for i = 1,code.n do |
69 | print(" "..tostring(i).." ("..type(code[i]).."): "..tostring(code[i])) | 64 | print(" "..tostring(i).." ("..type(code[i]).."): "..tostring(code[i])) |
diff --git a/src/luarocks/new_version.lua b/src/luarocks/new_version.lua index 4eebf26a..e1e3f80f 100644 --- a/src/luarocks/new_version.lua +++ b/src/luarocks/new_version.lua | |||
@@ -100,11 +100,11 @@ function run(...) | |||
100 | new_ver = old_ver | 100 | new_ver = old_ver |
101 | new_rev = tonumber(old_rev) + 1 | 101 | new_rev = tonumber(old_rev) + 1 |
102 | end | 102 | end |
103 | 103 | local new_rockver = new_ver:gsub("-", "") | |
104 | 104 | ||
105 | local out_rs = persist.load_into_table(filename) | 105 | local out_rs = persist.load_into_table(filename) |
106 | local out_name = out_rs.package:lower() | 106 | local out_name = out_rs.package:lower() |
107 | out_rs.version = new_ver.."-"..new_rev | 107 | out_rs.version = new_rockver.."-"..new_rev |
108 | if url then | 108 | if url then |
109 | out_rs.source.url = url | 109 | out_rs.source.url = url |
110 | check_url_and_update_md5(out_rs, out_name) | 110 | check_url_and_update_md5(out_rs, out_name) |
@@ -126,7 +126,7 @@ function run(...) | |||
126 | out_rs.build.type = "builtin" | 126 | out_rs.build.type = "builtin" |
127 | end | 127 | end |
128 | 128 | ||
129 | local out_filename = out_name.."-"..new_ver.."-"..new_rev..".rockspec" | 129 | local out_filename = out_name.."-"..new_rockver.."-"..new_rev..".rockspec" |
130 | 130 | ||
131 | persist.save_from_table(out_filename, out_rs, order) | 131 | persist.save_from_table(out_filename, out_rs, order) |
132 | 132 | ||