ComputerCraft Archive

tlco

computer operating-system kepler155c github

Description

ComputerCraft OS

Installation

Copy one of these commands into your ComputerCraft terminal:

wget:wget https://raw.githubusercontent.com/kepler155c/opus/develop-1.8/sys/boot/tlco.lua tlco
Archive:wget https://cc.shobie.xyz/cc/get/gh-kepler155c-opus-sys-boot-tlco tlco
Quick Install: wget https://cc.shobie.xyz/cc/get/gh-kepler155c-opus-sys-boot-tlco tlco

Usage

Run: tlco

Tags

none

Source

View Original Source

Code Preview

local run = os.run
local shutdown = os.shutdown

local args = {...} -- keep the args so that they can be passed to opus.lua

os.run = function() 
	os.run = run
end

os.shutdown = function()
	os.shutdown = shutdown

	_ENV.multishell = nil -- prevent sys/apps/shell.lua erroring for odd reasons

	local success, err = pcall(function()
		run(_ENV, 'sys/boot/opus.lua', table.unpack(args))
	end)
	term.redirect(term.native())
	if success then
		print("Opus OS abruptly stopped.")
	else
		printError("Opus OS errored.")
		printError(err)
	end
	print("Press any key to continue.")
	os.pullEvent("key")
	shutdown()
end

shell.exit()