Advertisement
Gokborg

GokOS Installer

Oct 21st, 2018
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.07 KB | None | 0 0
  1. --Installer
  2.  
  3. --Look for gokos
  4. local hasGokOs = fs.exists("gokos")
  5.  
  6. term.clear()
  7. term.setCursorPos(1,1)
  8. if hasGokOs == false then
  9.     term.write("Installing GokOs")
  10.    
  11.     --Setup the directories
  12.     shell.run("mkdir gokos")
  13.    
  14.     term.setCursorPos(1,2)
  15.     term.write("Creating directory: gokos")
  16.    
  17.     shell.run("cd gokos")
  18.    
  19.     term.setCursorPos(1,3)
  20.     term.write("Initializing gokos\\home")
  21.     shell.run("mkdir home")
  22.     shell.run("cd home")
  23.    
  24.     term.setCursorPos(1,4)
  25.     term.write("Initializing gokos\\home\\desktop")
  26.     shell.run("mkdir desktop")
  27.    
  28.     term.setCursorPos(1,5)
  29.     term.write("Initializing gokos\\home\\programs")
  30.     shell.run("mkdir programs")
  31.    
  32.     shell.run("cd /")
  33.    
  34.     if fs.exists("startup") == true then
  35.         shell.run("delete startup")
  36.     end
  37.     --Get the intial startup script
  38.     shell.run("pastebin get vpMfYK0v startup") 
  39.     os.reboot()
  40.     --shell.run("pastebin get PROGRAM_MANAGER program_manager")
  41.     --shell.run("pastebin get DESKTOP_PROGRAM desktop_prog")
  42.     --shell.run("pastebin get DESKTOP_BACKGROUND desktop_background")
  43. else
  44.     term.write("You already have GokOs!")
  45. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement