Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --gOS installer
- if not http then error("No http api"); end
- term.clear();
- term.setCursorPos(1,1);
- local env=getfenv(shell.run);
- env.print=function()end;
- setfenv(shell.run,env);
- print("Downloading gOS.lua...");
- local res=http.get("http://pastebin.com/raw.php?i=XTK18PyY");
- if res then
- local h=fs.open("gos.lua","w");
- h.write(res.readAll());
- h.close();
- res.close();
- print("gOS.lua downloaded");
- else
- print("Error downloading gOS.lua, maybe pastebin.com is not whitelisted?");
- env.print=print;
- setfenv(shell.run,env);
- error();
- end
- local h=fs.open("startup","w");
- h.writeLine("shell.run(\"gos.lua\");");
- h.close();
- print("Startup created");
- print("Done installing gOS, rebooting");
- sleep(2);
- os.reboot();
Advertisement
Add Comment
Please, Sign In to add comment