Advertisement
JereTheJuggler

update

Jan 1st, 2020
311
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. local tArgs = {...}
  2. if #tArgs ~= 2 then
  3. term.setTextColor(colors.red)
  4. print("usage: update.lua <pastebin code> <filename>")
  5. term.setTextColor(colors.white)
  6. else
  7. local code = tArgs{1}
  8. local password = tArgs{2}
  9. local root = shell.resolve("")
  10. if fs.exists(root.."/"..filename) then fs.delete(root.."/"..filename) end
  11. shell.run("pastebin","get",code,filename)
  12. shell.run(filename)
  13. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement