Advertisement
MrHG

turtleStartup 1.0

Aug 8th, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.36 KB | None | 0 0
  1. -- Put this on a turtle
  2. local diskDrive = peripheral.isPresent("left")
  3.  
  4. if diskDrive and fs.exists("disk/turtleStartup") then
  5.         local files = fs.list("disk/")
  6.         for i=1,#files do
  7.             if fs.exists("./"..files[i]) then
  8.                 fs.delete("./"..files[i])
  9.             end
  10.             fs.copy("disk/"..files[i],"./"..files[i])
  11.         end
  12.         print("Updated turtle programs from disk.")
  13. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement