Advertisement
cyber_Ahn

CawOS 3.0 installer and updater

Dec 6th, 2016
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.80 KB | None | 0 0
  1. -- MONITOR was CHANGED in monitor.cfg
  2. --optimal monitor size 5*4
  3.  
  4. local found = fs.exists("config/monitor.cfg")
  5. if found == false then
  6. print("Input Monitor Number:")
  7. input = read()
  8. local file = fs.open("config/monitor.cfg","w")
  9. file.writeLine(input)
  10. file.writeLine("peripheralspluplus_off")
  11. file.writeLine("space")
  12. file.writeLine("clear")
  13. file.close()
  14. end
  15. file = fs.open("config/monitor.cfg","r")
  16. local fileData = {}
  17. local line = file.readLine()
  18. repeat
  19. table.insert(fileData,line)
  20. line = file.readLine()
  21. until line == nil
  22. file.close()
  23. monitor_number = fileData[1]
  24.  
  25. local programName = "Caw_OS"
  26. local pasteIndex = "EZYiC6RV"
  27. shell.run("rm"..programName)
  28. shell.run("delete "..programName)
  29. shell.run("pastebin get "..pasteIndex.." "..programName)
  30. shell.run("monitor",monitor_number,programName)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement