Advertisement
Thomas9666

[Lua] gemOS install

Apr 3rd, 2018
1,181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. shell.run("pastebin", "get", "q761nqii","/os/api/tom")
  2. shell.run("pastebin", "get", "igXUE29e","/os/api/button")
  3. os.loadAPI("/os/api/tom")
  4. os.loadAPI("/os/api/button")
  5. tom.gui()
  6. tom.header("Do you wish to")
  7. tom.centre("install gemOS?")
  8. buty = 6
  9. button.makeButton(buty, "YES")
  10. buty = buty + 2
  11. button.makeButton(buty, "NO")
  12. local opt = button.selectButton(6,2)
  13. if opt == 1 then
  14. tom.gui()
  15. tom.header("Enter unique label")
  16. tom.newl("")
  17. local lab = read()
  18. shell.run("label", "set", lab)
  19. tom.gui()
  20. tom.header("Please create first user:")
  21. tom.newl("")
  22. local name = read()
  23. tom.gui()
  24. tom.header("Please enter")
  25. tom.centre("a password:")
  26. tom.newl("")
  27. local passwd = read()
  28. tom.gui()
  29. tom.header("Generating new user file")
  30. fs.makeDir("/os/.users")
  31. fpath = ("/os/.users/" .. name)
  32. local fuse = fs.open(fpath,"w")
  33. fuse.write(passwd)
  34. sleep(1)
  35. tom.gui()
  36. tom.header("User file created, installing gemOS")
  37. shell.run("pastebin", "get", "6AHrNpfW", "clc")
  38. shell.run("pastebin", "get", "LjMsFYju", "/os/term")
  39. shell.run("pastebin", "get", "QjkpmgZD", "/os/.menu")
  40. shell.run("pastebin", "get", "gJWsdXJq", "startup")
  41. shell.run("pastebin", "get", "6EhE7rZ2", "/os/progms")
  42. shell.run("pastebin", "get", "nFCN3FjE", "/os/shut")
  43. shell.run("pastebin", "get", "SfHY9j9i", "back")
  44. fs.makeDir("prog")
  45. sleep(2)
  46. tom.gui()
  47. tom.header("gemOS installed")
  48. tom.centre("Rebooting")
  49. sleep(3)
  50. os.reboot()
  51. elseif opt == 2 then
  52. tom.centre("Ok, rebooting")
  53. sleep(1)
  54. os.reboot()
  55. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement