Cakejoke

[CC] COS-CJE cjedisk program

Dec 22nd, 2012
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.70 KB | None | 0 0
  1. local isAdvanced = term.isColor()
  2.  
  3. local function printProgress(message, color)
  4.     if isAdvanced then
  5.         term.setTextColor(color)
  6.     end
  7.     print(message)
  8.     if isAdvanced then
  9.         term.setTextColor(colors.white)
  10.     end
  11. end
  12.  
  13. if not fs.exists("/disk") or not fs.isDir("/disk") then
  14.     printProgress("No disk found", colors.red)
  15. end
  16.  
  17. if fs.exists("/disk/cos-cje") then
  18.     fs.delete("/disk/cos-cje")
  19. end
  20.  
  21. if fs.exists("/disk/install") then
  22.     fs.delete("/disk/install")
  23. end
  24.  
  25. printProgress("Creating directories", colors.blue)
  26. fs.makeDir("/disk/cos-cje/apis/common")
  27. fs.makeDir("/disk/cos-cje/apis/turtle")
  28. fs.makeDir("/disk/cos-cje/programs/common")
  29. fs.makeDir("/disk/cos-cje/programs/turtle")
  30. fs.makeDir("/disk/cos-cje/data")
  31. printProgress("Done", colors.lime)
  32.  
  33. printProgress("Downloading files", colors.blue)
  34. shell.run("pastebin", "get", "W9BeB5JG", "/disk/install")
  35. shell.run("pastebin", "get", "CsZV3h03", "/disk/cos-cje/startup.lua")
  36. shell.run("pastebin", "get", "4fXUY0Y7", "/disk/cos-cje/apis/common/fsx.lua")
  37. shell.run("pastebin", "get", "8t7JcfC6", "/disk/cos-cje/apis/common/iox.lua")
  38. shell.run("pastebin", "get", "d93Nq6Dv", "/disk/cos-cje/apis/common/property.lua")
  39. shell.run("pastebin", "get", "sViT56pC", "/disk/cos-cje/apis/turtle/navigate.lua")
  40. shell.run("pastebin", "get", "EbL8uUVa", "/disk/cos-cje/programs/common/cjedisk.lua")
  41. shell.run("pastebin", "get", "TAXJwTwR", "/disk/cos-cje/programs/turtle/go.lua")
  42. shell.run("pastebin", "get", "1ZW6HxhJ", "/disk/cos-cje/programs/turtle/turn.lua")
  43. shell.run("pastebin", "get", "B51AcTke", "/disk/cos-cje/programs/turtle/writepos.lua")
  44. shell.run("pastebin", "get", "pGHa1LyC", "/disk/cos-cje/data/coscje.properties")
  45. printProgress("Done", colors.lime)
Advertisement
Add Comment
Please, Sign In to add comment