Advertisement
MinecraftRocks999

PaulOS Beta 0.1 Installer

Aug 2nd, 2013
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.55 KB | None | 0 0
  1. function install()
  2.    term.clear()
  3.    print("Starting Download...")
  4.    shell.run("mkdir", "/paulos")
  5.    shell.run("mkdir", "/paulos/apps")
  6.    shell.run("mkdir", "/paulos/resources")
  7.    shell.run("mkdir", "/paulos/versions/")
  8.    shell.run("mkdir", "/paulos/versions/0.1")
  9.    shell.run("pastebin", "get", "irGJwdnR", "/paulos/gui")
  10.    shell.run("pastebin", "get", "nuJvC6gZ", "/paulos/resources/logo")
  11.    shell.run("pastebin", "get", "z0eWzygs", "/paulos/resources/icon")
  12.    shell.run("pastebin", "get", "ikwJVwmL", "/paulos/resources/icon2")
  13.    shell.run("pastebin", "get", "s2UNJtg2", "/paulos/apps/filebrowser")
  14.    shell.run("pastebin", "get", "xrftbCc7", "/paulos/apps/games")
  15.    shell.run("pastebin", "get", "BLSi53FZ", "/startup")
  16.    print("Downloads finished!")
  17.    print("")
  18.    print("Rebooting in 1 second...")
  19.    os.sleep(1)
  20.    os.reboot()
  21. end
  22.  
  23. function upgrade()
  24.    shell.run("delete", "/paulos/gui")
  25.    shell.run("delete", "/paulos/resources/logo")
  26.    shell.run("delete", "/paulos/resources/icon")
  27.    shell.run("delete", "/paulos/resources/icon2")
  28.    shell.run("delete", "/paulos/apps/filebrowser")
  29.    shell.run("delete", "/paulos/apps/games")
  30.    shell.run("delete", "/startup")
  31. end
  32.  
  33. while true do
  34.     term.clear()
  35.     print("PaulOS Installer")
  36.     print("")
  37.     print("1. Install")
  38.     print("2. Upgrade")
  39.     print("Q. Cancel")
  40.     print("")
  41.     print("Choice: ")
  42.     choice = read()
  43.     if choice =="1" then
  44.        install()
  45.        os.reboot()
  46.     end
  47.     if choice =="2" then
  48.        upgrade()
  49.        install()
  50.        os.reboot()
  51.     end
  52.     if choice =="Q" then
  53.        break
  54.     end
  55. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement