Advertisement
Imgoodisher

run

Feb 28th, 2016
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.45 KB | None | 0 0
  1. local args = {...}
  2.  
  3. if #args < 1 then
  4.     print("Usage: "..(shell.getRunningProgram or os.getenv)("_").." <name> ...arguments")
  5.     return
  6. end
  7.  
  8. local remoteName = table.remove(args, 1)
  9.  
  10. local handle = http.get("http://71.191.167.186/"..remoteName..".lua")
  11. local path = remoteName
  12. local file = io.open(path, "w")
  13. file:write(handle.readAll())
  14. file:close(); -- semicolon required to make syntax unambiguous
  15.  
  16. (shell.run or shell.execute)(path, unpack(args))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement