/usr/share/lua/5.1/cliargs.lua is in lua-cliargs 3.0-1-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | -- luacheck: ignore 212
local core = require('cliargs.core')()
local unpack = _G.unpack or table.unpack
local cli = setmetatable({},{ __index = core })
function cli:parse(arguments, no_cleanup)
if not no_cleanup then
cli:cleanup()
end
local out = { core.parse(self, arguments) }
return unpack(out)
end
-- Clean up the entire module (unload the scripts) as it's expected to be
-- discarded after use.
function cli:cleanup()
for k, v in pairs(package.loaded) do
if (v == cli) or (k:match('cliargs')) then
package.loaded[k] = nil
end
end
cli = nil
end
cli.VERSION = "3.0-1"
return cli
|