JackMacWindows

CCV Install

Aug 5th, 2016
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.65 KB | None | 0 0
  1. term.setTextColor(colors.red)
  2. while not fs.isDir("/disk") and fs.list("/disk") ~= {} do
  3.     term.clear()
  4.     term.setCursorPos(1, 1)
  5.     print("Please insert an empty disk into /disk (or be cheaty & create /disk)")
  6.     sleep(.1)
  7.     os.queueEvent("setup")
  8.     os.pullEvent("setup")
  9. end
  10. print("Downloading data...")
  11. local files = {"setup", "startup", "data/ccp", "data/archive.ccp"}
  12. fs.makeDir("/disk/data")
  13. for k,v in ipairs(files) do
  14.     print("Downloading " .. v)
  15.     local file = fs.open("/disk/" .. v, "w")
  16.     file.write(http.get("http://cppconsole.bruienne.com/repos/compcraft/ccv/raw/" .. v).readAll())
  17.     file.close()
  18. end
  19. print("Setup downloaded to /disk/setup")
Add Comment
Please, Sign In to add comment