diff options
| author | Hisham Muhammad <hisham@gobolinux.org> | 2013-12-19 16:06:45 -0200 |
|---|---|---|
| committer | Hisham Muhammad <hisham@gobolinux.org> | 2014-01-10 16:40:39 -0200 |
| commit | f50cde93fe41f91466e1f355b4aa035f20144527 (patch) | |
| tree | eafd8951fa400a9a665316ad1fc29f712d1d117d | |
| parent | cd0054de7731adc208cceb314b1b10cbbed470de (diff) | |
| download | luarocks-f50cde93fe41f91466e1f355b4aa035f20144527.tar.gz luarocks-f50cde93fe41f91466e1f355b4aa035f20144527.tar.bz2 luarocks-f50cde93fe41f91466e1f355b4aa035f20144527.zip | |
Add fs.browser command
| -rw-r--r-- | src/luarocks/fs/unix/tools.lua | 4 | ||||
| -rw-r--r-- | src/luarocks/fs/win32/tools.lua | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/luarocks/fs/unix/tools.lua b/src/luarocks/fs/unix/tools.lua index 5495760b..91ea86c5 100644 --- a/src/luarocks/fs/unix/tools.lua +++ b/src/luarocks/fs/unix/tools.lua | |||
| @@ -341,3 +341,7 @@ function get_permissions(filename) | |||
| 341 | pipe:close() | 341 | pipe:close() |
| 342 | return ret | 342 | return ret |
| 343 | end | 343 | end |
| 344 | |||
| 345 | function browser(url) | ||
| 346 | return os.execute(cfg.web_browser..' '..url) | ||
| 347 | end | ||
diff --git a/src/luarocks/fs/win32/tools.lua b/src/luarocks/fs/win32/tools.lua index 345ec682..e18ae58e 100644 --- a/src/luarocks/fs/win32/tools.lua +++ b/src/luarocks/fs/win32/tools.lua | |||
| @@ -362,3 +362,7 @@ function exists(file) | |||
| 362 | assert(file) | 362 | assert(file) |
| 363 | return fs.execute_quiet("if not exist " .. fs.Q(file) .. " invalidcommandname") | 363 | return fs.execute_quiet("if not exist " .. fs.Q(file) .. " invalidcommandname") |
| 364 | end | 364 | end |
| 365 | |||
| 366 | function browser(url) | ||
| 367 | return os.execute(cfg.web_browser..' '..url) | ||
| 368 | end | ||
