Advertisement
opencomputerstest2

tlco.lua

Apr 24th, 2024 (edited)
599
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.46 KB | None | 0 0
  1. local run = os.run
  2.  
  3. local args = {...} -- keep the args so that they can be passed to opus.lua
  4.  
  5. os.shutdown = function()
  6.     _ENV.multishell = nil -- prevent sys/apps/shell.lua erroring for odd reasons
  7.  
  8.     local success, err = pcall(function()
  9.         run(_ENV, '/rom/programs/shell.lua', table.unpack(args))
  10.     end)
  11.     term.redirect(term.native())
  12.     if not sucess then
  13.         printError(err)
  14.     end
  15.     print("Press any key to continue.")
  16.     os.pullEvent("key")
  17.     os.reboot()
  18. end
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement