1
0
mirror of https://github.com/ShadowKatStudios/OC-Minitel.git synced 2024-11-15 06:48:05 +11:00
OC-Minitel/RPC/OpenOS/usr/bin/exportcomponent.lua

16 lines
368 B
Lua

local component = require "component"
local r2r = require "r2r"
local tA = {...}
if #tA < 1 then
print("Usage: exportcomponent <component address> [component address...]")
end
for k,v in ipairs(tA) do
local px = component.proxy(component.get(v))
print(px.type.."_"..px.address)
for l,m in pairs(px) do
r2r.register(px.type.."_"..px.address.."_"..l,m)
end
end