Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/zsh
- while true ; do
- clear
- if macvdmtool nop | grep -q 'Status: APP'; then
- echo "Macbook detected..."
- sleep 1
- vared -p 'If you want to continue with the reinstall write "go" ' -c go
- if [[ "$go" == "go" ]]; then
- echo "Lets go..."
- sleep 1
- echo "Rebooting to DFU"
- if macvdmtool reboot serial | grep -q 'VDM failed'; then
- clear
- echo "Intel Macbook detected... I can't work with that"
- echo 'Disconnect it and press any key...'; read -k1 -s
- else
- sleep 10
- if macvdmtool dfu | grep -q 'VDM failed'; then
- clear
- echo "Intel Macbook detected... I can't work with that"
- echo 'Disconnect it and press any key...'; read -k1 -s
- else
- sleep 10
- echo "Reinstalling..."
- cfgutil restore -I /Users/Shared/UniversalMac_12.2_21D49_Restore.ipsw
- echo 'Done. Disconnect the mac and press any key or I will reinstall again.'; read -k1 -s
- go=""
- fi
- fi
- else
- echo 'Thats not GO. Start again...'; read -k1 -s
- go=""
- fi
- else
- echo "No M1 Macbook connected...(Use upper left usb-c port)"
- sleep 5
- fi
- go=""
- done
Advertisement
Add Comment
Please, Sign In to add comment