Advertisement
Marlingaming

Boot Loader Task Runner

Dec 15th, 2021 (edited)
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. --this script runs all the Boot files in order in the Boot file
  2. version = "1.0.0"
  3. local file = fs.open(".Boot_BootFile","r")
  4. local Tasks = file.readAll
  5. file.close()
  6.  
  7. local Scripts = fs.open(".OS_SystemFiles","r")
  8. local MenuScript = Scripts.readLine(4)
  9. Scripts.close()
  10.  
  11. local function TaskRunner()
  12. term.clear()
  13. term.setCursorPos(1,1)
  14. print("BOOT SYSTEM")
  15. print("////////////////////////")
  16. for i=1, #Tasks do
  17. print("starting "..Tasks[i])
  18. shell.run(Tasks[i])
  19. print(Tasks[i].." Completed")
  20. end
  21. end
  22.  
  23. parellel.waitForAll(TaskRunner)
  24. shell.run(MenuScript)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement