Advertisement
programcreator

FTP: installer

Feb 16th, 2015
490
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.19 KB | None | 0 0
  1. args = {...}
  2. term.clear()
  3. term.setCursorPos(1,1)
  4.  
  5. FTPclient = {
  6.     {"FTPclient","3aYPcKBM"},
  7.     {"FTPconfig/fileIcon","4zX25MSQ"},
  8.     {"FTPconfig/folderIcon","3PF9u5G6"},
  9.     {"FTPconfig/folderIcon","3PF9u5G6"},
  10.     {"FTPconfig/folderIcon","3PF9u5G6"},
  11.     {"subPrograms/nPaintPro","MMa4LJ3Z"},
  12.     {"subPrograms/edit","yiTQi6Ei"},
  13.     {"IPclient","xGvfATzP"},
  14. }
  15.  
  16. FTPserver = {
  17.     {"FTPserver","fRgVqkx8"},
  18.     {"IPclient","xGvfATzP"},
  19. }
  20.  
  21. IPnet = {
  22.     {"IPnet","2qwZMpSB"}
  23. }
  24.  
  25. if #args == 0 then
  26.     print("Usage: FTPinstaller <argument>")
  27.     print("Argument can be IPnet, FTPclient or FTPserver.")
  28. elseif args[1] == "FTPclient" then
  29.     for i,v in pairs(FTPclient) do
  30.         if fs.exists(v[1]) then
  31.             fs.delete(v[1])
  32.         end
  33.         shell.run("pastebin get "..v[2].." "..v[1])
  34.     end
  35. elseif args[1] == "FTPserver" then
  36.     for i,v in pairs(FTPserver) do
  37.         if fs.exists(v[1]) then
  38.             fs.delete(v[1])
  39.         end
  40.         shell.run("pastebin get "..v[2].." "..v[1])
  41.     end
  42. elseif args[1] == "IPnet" then
  43.     for i,v in pairs(IPnet) do
  44.         if fs.exists(v[1]) then
  45.             fs.delete(v[1])
  46.         end
  47.         shell.run("pastebin get "..v[2].." "..v[1])
  48.     end
  49. else
  50.     print("Usage: IPnet <argument>")
  51.     print("Argument can be IPnet, FTPclient or FTPserver.")
  52. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement