mirror of
https://github.com/IgorTimofeev/MineOS.git
synced 2025-12-20 02:59:20 +01:00
31 lines
564 B
Lua
31 lines
564 B
Lua
|
|
local result, reason = ""
|
|
|
|
do
|
|
local handle, chunk = component.proxy(component.list("internet")() or error("Required internet component is missing")).request("https://raw.githubusercontent.com/IgorTimofeev/MineOS/master/Installer/Main.lua")
|
|
|
|
while true do
|
|
chunk = handle.read(math.huge)
|
|
|
|
if chunk then
|
|
result = result .. chunk
|
|
else
|
|
break
|
|
end
|
|
end
|
|
|
|
handle.close()
|
|
end
|
|
|
|
result, reason = load(result, "=installer")
|
|
|
|
if result then
|
|
result, reason = xpcall(result, debug.traceback)
|
|
|
|
if not result then
|
|
error(reason)
|
|
end
|
|
else
|
|
error(reason)
|
|
end
|