CultistaDeCrocs

updateMachine

Sep 15th, 2024
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.83 KB | None | 0 0
  1. require("libraries.asshat")
  2.  
  3. function removeProgramas()
  4.     print("Removing native programs...")
  5.  
  6.     if not shell.run("rm", "./*.lua") then
  7.         printCor("Failed to remove files.", colors.red)
  8.         os.exit()
  9.     end
  10. end
  11.  
  12. function removeBibliotecas()
  13.     print("Removing libraries...")
  14.  
  15.     if not shell.run("rm", "./libraries") then
  16.         printCor("Failed to remove libraries.", colors.red)
  17.         os.exit()
  18.     end
  19. end
  20.  
  21. function copiaArquivos()
  22.     print("Copying files from disk...")
  23.  
  24.     if not shell.run("cp", "./disk/*", "./") then
  25.         printCor("Failed to copy files.", colors.red)
  26.         os.exit()
  27.     end
  28. end
  29.  
  30. if fs.exists("./disk/") then
  31.     removeProgramas()
  32.     removeBibliotecas()
  33.     copiaArquivos()
  34.     printCor("Success!", colors.green)
  35. else
  36.     printCor("Disk not found.", colors.red)
  37. end
Add Comment
Please, Sign In to add comment