ColdIV

Update

Jul 15th, 2021 (edited)
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.66 KB | None | 0 0
  1. local args = {...}
  2. if args[1] == "update" then
  3.     if args[2] == "run" then
  4.         shell.run("pastebin", "run", "FuQ3WvPs zLrVLa2s update run")
  5.     else
  6.         shell.run("pastebin", "run", "FuQ3WvPs zLrVLa2s update")
  7.     end
  8. else
  9.     local FileList = fs.list("")
  10.  
  11.     for _, file in ipairs(FileList) do
  12.         if fs.isDir(file) or file == "update" or file == "updater" or file == "rom" or file == "startup" or file == "startup.lua" then
  13.             -- we ignore those
  14.             print ("Skipping " .. file)
  15.         else
  16.             print ("Updating " .. file .. "...")
  17.             shell.run(file, "update")
  18.             print ("Done")
  19.         end
  20.     end
  21. end
Add Comment
Please, Sign In to add comment