diff options
| author | Lawrence Hoffman <lawrencehoffman@users.noreply.github.com> | 2021-03-16 18:05:18 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-16 20:05:18 -0300 |
| commit | 247b21d1e221e27a837d09bf26f3e02383c748bb (patch) | |
| tree | 066b0068f55287e3aaaacdd0fd99b9f150089fc0 /src | |
| parent | 1db99934fc304f46b94983a5ad118cbb0cea2a72 (diff) | |
| download | luarocks-247b21d1e221e27a837d09bf26f3e02383c748bb.tar.gz luarocks-247b21d1e221e27a837d09bf26f3e02383c748bb.tar.bz2 luarocks-247b21d1e221e27a837d09bf26f3e02383c748bb.zip | |
Add filesystem abstraction for NetBSD (#1267)
* Add fs abstraction file for NetBSD
* Add init function with verification that the unzip binary is
available
Co-authored-by: Lawrence Hoffman <lawrence.hoffman@block-g.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/luarocks/fs/netbsd.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/luarocks/fs/netbsd.lua b/src/luarocks/fs/netbsd.lua new file mode 100644 index 00000000..b9610339 --- /dev/null +++ b/src/luarocks/fs/netbsd.lua | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | --- NetBSD implementation of filesystem and platform abstractions. | ||
| 2 | local netbsd = {} | ||
| 3 | |||
| 4 | local fs = require("luarocks.fs") | ||
| 5 | |||
| 6 | function netbsd.init() | ||
| 7 | local uz=io.open("/usr/bin/unzip", "r") | ||
| 8 | if uz ~= nil then | ||
| 9 | io.close(uz) | ||
| 10 | fs.set_tool_available("unzip", true) | ||
| 11 | end | ||
| 12 | end | ||
| 13 | |||
| 14 | return netbsd | ||
