Advertisement
DOGGYWOOF

Doggy OS bootloader / Firmware

Jan 15th, 2025 (edited)
21
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. -- List of required files
  2. local requiredFiles = {
  3. "/disk/bootloader/VA11-ILLA.lua",
  4. "/disk/os/home.lua",
  5. "/disk/os/lock.lua",
  6. "/disk/boot/boot-animation",
  7. "/disk/error/BSOD.lua",
  8. -- Add more file names as needed
  9. }
  10.  
  11. -- Function to check if all required files exist
  12. os.pullEvent = os.pullEventRaw
  13.  
  14. local function checkFiles()
  15. local missingFiles = {}
  16.  
  17. for _, fileName in ipairs(requiredFiles) do
  18. if not fs.exists(fileName) then
  19. table.insert(missingFiles, fileName)
  20. end
  21. end
  22.  
  23. return missingFiles
  24. end
  25.  
  26. -- Main function to execute no-os.lua if files are missing
  27. local function main()
  28. local missing = checkFiles()
  29.  
  30. if #missing > 0 then
  31. -- Execute no-os.lua if any files are missing
  32. shell.run("no-os")
  33. else
  34. -- All files exist, continue with your code here
  35. shell.run("/disk/boot/CFW-check.lua")
  36. -- Add your code to run if all files exist
  37. end
  38. end
  39.  
  40. -- Run the main function
  41. main()
  42.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement