Advertisement
leo1553

CC - Auto updater

Jul 28th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.32 KB | None | 0 0
  1. -- Constantes
  2. local programName = ""
  3. local pastebinUrl = ""
  4. local params = {...}
  5.  
  6. -- Apagar programa existente
  7. if fs.exists(programName) then
  8.     shell.run("rm", programName)
  9. end
  10.  
  11. -- Baixar novamente
  12. shell.run("pastebin", "get", pastebinUrl, programName)
  13. term.clear()
  14.  
  15. -- Executar
  16. shell.run(programName, params)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement