Advertisement
mathiaas

update

Apr 7th, 2024 (edited)
817
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.39 KB | None | 0 0
  1. local function updateScript(hash, path)
  2.     if fs.exists(path) then
  3.         fs.delete(path)
  4.     end
  5.     shell.run("pastebin get " .. hash .. " " .. path)
  6. end
  7.  
  8. local scripts = dofile("/disk/scripts")
  9.  
  10. for _,v in pairs(scripts) do
  11.     updateScript(v.hash, v.directory .. "/" .. v.name)
  12. end
  13.  
  14. if fs.exists(".env") then
  15.     fs.delete("/disk/.env")
  16.     fs.copy(".env", "/disk/.env")
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement