Advertisement
DOGGYWOOF

test2

Apr 1st, 2024 (edited)
14
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.09 KB | None | 0 0
  1. -- Doggy OS Developer Firmware Installer
  2.  
  3. -- Function to install custom bootloader
  4. local function installCustomBootloader(bootloaderFile)
  5. -- Delete existing bootloader file
  6. fs.delete("/startup")
  7.  
  8. -- Copy custom bootloader file to startup (root directory of computer)
  9. fs.copy(bootloaderFile, "/startup")
  10.  
  11. print("Custom bootloader installed successfully.")
  12. end
  13.  
  14. -- Function to install custom recovery
  15. local function installCustomRecovery(recoveryFile)
  16. -- Delete existing recovery file
  17. fs.delete("/disk/boot/Recovery.lua")
  18.  
  19. -- Copy custom recovery file to /disk/boot/Recovery.lua
  20. fs.copy(recoveryFile, "/disk/boot/Recovery.lua")
  21.  
  22. print("Custom recovery installed successfully.")
  23. end
  24.  
  25. -- Function to install custom boot error message
  26. local function installCustomBootErrorMessage(errorMessageFile)
  27. -- Delete existing boot error message file
  28. fs.delete("/no-os")
  29.  
  30. -- Copy custom boot error message file to /no-os
  31. fs.copy(errorMessageFile, "/no-os")
  32.  
  33. print("Custom boot error message installed successfully.")
  34. end
  35.  
  36. -- Main function
  37. local function main()
  38. print("Welcome to Doggy OS Developer Firmware Installer")
  39. print("1. Install Custom Bootloader")
  40. print("2. Install Custom Recovery")
  41. print("3. Install Custom Boot Error Message")
  42. print("4. Exit")
  43.  
  44. local choice = tonumber(read())
  45. if choice == 1 then
  46. print("Enter the path to the custom bootloader file:")
  47. local bootloaderFile = read()
  48. installCustomBootloader(bootloaderFile)
  49. elseif choice == 2 then
  50. print("Enter the path to the custom recovery file:")
  51. local recoveryFile = read()
  52. installCustomRecovery(recoveryFile)
  53. elseif choice == 3 then
  54. print("Enter the path to the custom boot error message file:")
  55. local errorMessageFile = read()
  56. installCustomBootErrorMessage(errorMessageFile)
  57. elseif choice == 4 then
  58. print("Rebooting...")
  59. os.reboot()
  60. else
  61. print("Invalid choice.")
  62. end
  63. end
  64.  
  65. -- Run the main function
  66. main()
  67.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement