Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tArgs = { ... }
- Version = 1.0
- --print("timia2109's Upd8r/In5t4ll3r V",Version)
- --print("Install server tools...")
- --print("Connecting to server....")
- Server = "http://timia2109.com/filez/sync.php?mode=server"
- if term.isColor() == true then
- Color = true
- --term.setBackgroundColor(colors.white)
- else
- Color = false
- end
- function getAll()
- a = http.get(Server)
- All = textutils.unserialize(a.readAll())
- end
- getAll()
- x = 1
- function makeColor(qwert,trewq)
- if Color == true then
- --term.setTextColor(qwert)
- if trewq ~= nil then
- --term.setBackgroundColor(trewq)
- end
- end
- end
- makeColor(colors.black)
- --print("Local V",Version," | Server V",All["sync.php"])
- if tArgs[1] == nil then
- getAll()
- while x <= All["Inhalt"] do
- Name = All["Name"..x]
- a = http.get(All["Link"..x])
- if fs.exists(Name) then
- makeColor(colors.red)
- --print(" => Habe ",Name," gefunden.")
- fs.delete(Name)
- end
- makeColor(colors.green)
- --print("Erstelle ",Name)
- b = fs.open(Name, "w")
- b.write(a.readAll())
- b.close()
- x=x+1
- end
- makeColor(colors.blue)
- --print("All filez are In5t4ll3d or Upd8ed")s
- makeColor(colors.white,colors.black)
- else
- a = http.get("Server")
- a = a.readAll()
- if a == 'NA' then
- print("File dosn't exsits!")
- else
- b = fs.open(tArgs[1],"w")
- b.write(a)
- b.close()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement