Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Path = "boot/Security/ReqFiles.txt"
- local Req = {}
- function GetList()
- local F1 = fs.open(Path,"r")
- Req = textutils.unserialize(F1.readAll())
- F1.close()
- end
- function Replace(I)
- print("Missing File: ", Req[I][1],", Attempting Download/Replacement")
- if Req[I][2] ~= "Doc" then
- shell.run("pastebin","get",Req[I][2],Req[I][1])
- else
- local file = fs.open(Req[I][1],"w")
- file.close()
- end
- end
- GetList()
- for i = 1, #Req do
- if fs.exists(Req[i][1]) then
- else
- Replace(i)
- end
- end
Add Comment
Please, Sign In to add comment