From 247b21d1e221e27a837d09bf26f3e02383c748bb Mon Sep 17 00:00:00 2001 From: Lawrence Hoffman Date: Tue, 16 Mar 2021 18:05:18 -0500 Subject: 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 --- src/luarocks/fs/netbsd.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/luarocks/fs/netbsd.lua (limited to 'src') 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 @@ +--- NetBSD implementation of filesystem and platform abstractions. +local netbsd = {} + +local fs = require("luarocks.fs") + +function netbsd.init() + local uz=io.open("/usr/bin/unzip", "r") + if uz ~= nil then + io.close(uz) + fs.set_tool_available("unzip", true) + end +end + +return netbsd -- cgit v1.2.3-55-g6feb