Guest User

Untitled

a guest
Jan 10th, 2025
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. #!/bin/zsh
  2.  
  3. while true ; do
  4. clear
  5. if macvdmtool nop | grep -q 'Status: APP'; then
  6. echo "Macbook detected..."
  7. sleep 1
  8. vared -p 'If you want to continue with the reinstall write "go" ' -c go
  9. if [[ "$go" == "go" ]]; then
  10. echo "Lets go..."
  11. sleep 1
  12. echo "Rebooting to DFU"
  13. if macvdmtool reboot serial | grep -q 'VDM failed'; then
  14. clear
  15. echo "Intel Macbook detected... I can't work with that"
  16. echo 'Disconnect it and press any key...'; read -k1 -s
  17. else
  18. sleep 10
  19. if macvdmtool dfu | grep -q 'VDM failed'; then
  20. clear
  21. echo "Intel Macbook detected... I can't work with that"
  22. echo 'Disconnect it and press any key...'; read -k1 -s
  23. else
  24. sleep 10
  25. echo "Reinstalling..."
  26. cfgutil restore -I /Users/Shared/UniversalMac_12.2_21D49_Restore.ipsw
  27. echo 'Done. Disconnect the mac and press any key or I will reinstall again.'; read -k1 -s
  28. go=""
  29. fi
  30. fi
  31. else
  32. echo 'Thats not GO. Start again...'; read -k1 -s
  33. go=""
  34. fi
  35. else
  36. echo "No M1 Macbook connected...(Use upper left usb-c port)"
  37. sleep 5
  38. fi
  39. go=""
  40. done
  41.  
Advertisement
Add Comment
Please, Sign In to add comment