Operating system for OpenComputers
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

18 satır
535B

  1. print(pcall(function()
  2. local shenv = {}
  3. function shenv.quit()
  4. os.setenv("run",nil)
  5. end
  6. setmetatable(shenv,{__index=function(_,k) if _G[k] then return _G[k] elseif fs.exists("/boot/exec/"..k..".lua") then return loadfile("/boot/exec/"..k..".lua") end end})
  7. print(_VERSION)
  8. os.setenv("run",true)
  9. while os.getenv("run") do
  10. io.write((os.getenv("PWD") or _VERSION).."> ")
  11. tResult = {pcall(load(io.read(),"shell","t",shenv))}
  12. if tResult[1] == true then table.remove(tResult,1) end
  13. for k,v in pairs(tResult) do
  14. print(v)
  15. end
  16. end
  17. end))