theinsekt

downloader2

Sep 3rd, 2014
409
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.27 KB | None | 0 0
  1. function download(folder,files,rmFolder,rmFile)
  2.     if rmFolder then
  3.             fs.delete(folder)
  4.         end
  5.     -- make the folder
  6.     fs.makeDir(folder)
  7.  
  8.     -- download files
  9.     for code, filename in pairs(files) do
  10.                 if rmFile then
  11.                     fs.delete(folder.."/"..filename)
  12.                 end
  13.         shell.run("pastebin","get", code, folder.."/"..filename)
  14.     end --for
  15. end --function
  16.  
  17. -- the list of files to download
  18. -- just comment out unwanted files
  19. local myapis={
  20. ["iYV8PrtL"]="poz2",--have to do like this if code starts with number
  21. ["w5y9qcSp"]="poz2a",
  22. ["1sajuqmJ"]="poz3",
  23. ["pYE2EykZ"]="poz3a",
  24. ["5cAbjHsM"]="sha256",--(made by GravityScore)
  25. --["eBiUQeyu"]="hsign",
  26. ["iKRK97NL"]="hsign2",
  27. }
  28.  
  29. -- the list of files to download
  30. -- just comment out unwanted files
  31. local myprograms={
  32. ["LK9UYwi9"]="poz2test",--have to do like this if code starts with number
  33. ["JiYQBViS"]="excavating",
  34. ["mgZhFzR7"]="dcube",
  35. ["iD8UZqM5"]="dcube2",
  36. ["93tf5WM0"]="poz3test",
  37. --["afN3tpQ0"]="testhsign",
  38. ["pSmAGU7W"]="testhsign2",
  39. ["JythwYyW"]="orefinder",
  40. ["iiRX8ezE"]="orefinder2",
  41. }
  42. args={...}
  43. local rm=false
  44. if #args==1 then
  45.  if args[1]=="rm" then
  46.   rm=true
  47.  end
  48. end
  49.  
  50. download("/theinsektAPIs",myapis,false,true)
  51. download("/theinsekt",myprograms,false,true)
Add Comment
Please, Sign In to add comment