Commandcracker

OculusOS installer

Jan 24th, 2021 (edited)
447
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- https://github.com/Commandcracker/oculusos
  2. if not http then
  3.     printError("oculusos requires the http API")
  4.     printError("Set http_enable to true in ComputerCraft.cfg")
  5.     return
  6. end
  7.  
  8. local function get(url)
  9.     local response = http.get(url)
  10.    
  11.     if response then
  12.         local sResponse = response.readAll()
  13.         response.close()
  14.         return sResponse
  15.     else
  16.         print( "Failed." )
  17.     end
  18. end
  19.  
  20. local url = "https://raw.githubusercontent.com/Commandcracker/oculusos/master/installer.lua"
  21. local tArgs = { ... }
  22. local res = get(url)
  23.  
  24. if res then
  25.     local func, err = load(res, url, "t", _ENV)
  26.     if not func then
  27.         printError( err )
  28.         return
  29.     end
  30.     local success, msg = pcall(func, table.unpack(tArgs, 1))
  31.     if not success then
  32.         printError( msg )
  33.     end
  34. end
  35.  
RAW Paste Data