diff options
author | Hisham Muhammad <hisham@NewMachine.localdomain> | 2010-05-17 16:55:23 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@NewMachine.localdomain> | 2010-05-17 16:55:23 -0300 |
commit | 85dac7d8a73e873eb1e126e5c05cdfe03ce45d76 (patch) | |
tree | 2b41595ed9bcf9e2992d98039d52a0eb1e93587d | |
parent | 15d1fc6d08f841db76832c39d043296a8666210f (diff) | |
download | luarocks-85dac7d8a73e873eb1e126e5c05cdfe03ce45d76.tar.gz luarocks-85dac7d8a73e873eb1e126e5c05cdfe03ce45d76.tar.bz2 luarocks-85dac7d8a73e873eb1e126e5c05cdfe03ce45d76.zip |
fix interaction with md5 calculation tools
Diffstat (limited to '')
-rw-r--r-- | src/luarocks/fs/unix/tools.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/luarocks/fs/unix/tools.lua b/src/luarocks/fs/unix/tools.lua index e26595d0..33dbc489 100644 --- a/src/luarocks/fs/unix/tools.lua +++ b/src/luarocks/fs/unix/tools.lua | |||
@@ -291,21 +291,21 @@ function get_md5(file, md5sum) | |||
291 | local computed | 291 | local computed |
292 | if cfg.md5checker == "md5sum" then | 292 | if cfg.md5checker == "md5sum" then |
293 | local pipe = io.popen("md5sum "..file) | 293 | local pipe = io.popen("md5sum "..file) |
294 | computed = pipe:read("*l") | 294 | computed = pipe:read("*a") |
295 | pipe:close() | 295 | pipe:close() |
296 | if computed then | 296 | if computed then |
297 | computed = computed:gsub("[^%x]+", ""):sub(1,32) | 297 | computed = computed:gsub("[^%x]+", ""):sub(1,32) |
298 | end | 298 | end |
299 | elseif cfg.md5checker == "openssl" then | 299 | elseif cfg.md5checker == "openssl" then |
300 | local pipe = io.popen("openssl md5 "..file) | 300 | local pipe = io.popen("openssl md5 "..file) |
301 | computed = pipe:read("*l") | 301 | computed = pipe:read("*a") |
302 | pipe:close() | 302 | pipe:close() |
303 | if computed then | 303 | if computed then |
304 | computed = computed:sub(-32) | 304 | computed = computed:sub(-32) |
305 | end | 305 | end |
306 | elseif cfg.md5checker == "md5" then | 306 | elseif cfg.md5checker == "md5" then |
307 | local pipe = io.popen("md5 "..file) | 307 | local pipe = io.popen("md5 "..file) |
308 | computed = pipe:read("*l") | 308 | computed = pipe:read("*a") |
309 | pipe:close() | 309 | pipe:close() |
310 | if computed then | 310 | if computed then |
311 | computed = computed:sub(-32) | 311 | computed = computed:sub(-32) |