Advertisement
Namentis

Untitled

Aug 26th, 2015
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(1,1)
  3.  
  4. if not http then
  5. write("LyokOS requiert l'API http d'active.", 2)
  6. end
  7.  
  8. function fileDownload(path, url)
  9. local download = http.get(url)
  10. local text = download.readAll()
  11. local file = assert(io.open(path, "w"))
  12. file:write(text)
  13. file:close()
  14. end
  15.  
  16. function logo()
  17. term.clear()
  18. term.setCursorPos(1,1)
  19. print(" _ _ ____ _____ ")
  20. print(" | | | | / __ \\ / ____|")
  21. print(" | | _ _ ___ | | _| | | | (___ ")
  22. print(" | | | | | |/ _ \\| |/ / | | |\\___ \\ ")
  23. print(" | |___| |_| | (_) | <| |__| |____) |")
  24. print(" |______\\__, |\\___/|_|\\_\\\\____/|_____/ ")
  25. print(" __/ | ")
  26. print(" |___/ ")
  27. end
  28.  
  29. logo()
  30. if fs.exists("/startup") then fs.delete("/startup") end
  31. if fs.exists("/install") then fs.delete("/install") end
  32. if fs.exists("/BMOS/apis") then fs.delete("/BMOS/apis") end
  33. if fs.exists("/BMOS/image") then fs.delete("/BMOS/image") end
  34. if fs.exists("/BMOS/turtle") then fs.delete("/BMOS/turtle") end
  35.  
  36. fs.makeDir("/BMOS/apis")
  37. fs.makeDir("/BMOS/image")
  38. fs.makeDir("/BMOS/turtle")
  39.  
  40. fileDownload("/install", "https://dl.dropboxusercontent.com/u/47902751/download/BMOS/install")
  41. fileDownload("/BMOS/apis/lyokos", "https://dl.dropboxusercontent.com/u/47902751/download/BMOS/lyokos")
  42. fileDownload("/BMOS/image/LyokOS", "https://dl.dropboxusercontent.com/u/47902751/download/BMOS/image/LyokOS")
  43. shell.run("/install")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement