Advertisement
civilwargeeky

UpdatePastebin.lua

Oct 31st, 2014
337
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.32 KB | None | 0 0
  1. --Updates programs from a pastebin
  2.  
  3. local tArgs = {...}
  4. if #tArgs < 2 then
  5.   print("Usage: update [pasteID] [fileName]")
  6.   error("",0)
  7. end
  8.  
  9. local id, file = tArgs[1], tArgs[2]
  10.  
  11. if fs.exists(file) then
  12.   print("Removing Existing File")
  13.   fs.delete(file)
  14. end
  15. shell.run("pastebin get "..id.." "..file)
  16. print("Done")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement