Advertisement
MarcoPolo0306

M-OS Rebirthed Installer

Dec 30th, 2017
1,316
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.21 KB | None | 0 0
  1. --M-OS Installer
  2. --Beta 0.1 Pre-release
  3.  
  4. local function gitFile(path)
  5.     print("Downloading: "..path)
  6.     local download = http.get("https://raw.githubusercontent.com/MarcoPolo0306/M-OS-Rebirthed/master/M-OS/"..path)
  7.     local data = download.readAll()
  8.     download.close()
  9.  
  10.     local file = fs.open(path,"w")
  11.     file.write(data)
  12.     file.close()
  13.     print(path.." finished downloading.")
  14. end
  15.  
  16. print("Setup is starting")
  17. if fs.exists("M-OS_Rebirthed") then
  18.     fs.delete("M-OS_Rebirthed")
  19. end
  20. if fs.exists("startup") then
  21.     fs.delete("startup")
  22. end
  23.  
  24. gitFile("startup")
  25. gitFile("M-OS_Rebirthed/boot.lua")
  26. gitFile("M-OS_Rebirthed/crypt")
  27. gitFile("M-OS_Rebirthed/desktop.lua")
  28. gitFile("M-OS_Rebirthed/logon.lua")
  29. gitFile("M-OS_Rebirthed/programs.lua")
  30. gitFile("M-OS_Rebirthed/settings.lua")
  31. gitFile("M-OS_Rebirthed/config/desktop-background-color.config")
  32. gitFile("M-OS_Rebirthed/config/pass.txt")
  33. gitFile("M-OS_Rebirthed/img/logo.img")
  34. gitFile("M-OS_Rebirthed/programs/FileBrowser")
  35. gitFile("M-OS_Rebirthed/sysdata/releasedate.syscfg")
  36. gitFile("M-OS_Rebirthed/sysdata/version.syscfg")
  37. gitFile("M-OS_Rebirthed/sysdata/versionNumber.syscfg")
  38. print("Install complete")
  39. print("Your computer will now reboot.")
  40. sleep(1)
  41. os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement