Created
April 9, 2023 00:43
-
-
Save spencer1573/4955bf47881e55ef08e2723dcde11356 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
#=========================================================================== | |
# Works only with the official image available in the Mac App Store. | |
# Make sure you download the official installer before running this script. | |
#=========================================================================== | |
# Change this at your desire. Sometimes this works out of the box, sometimes not. | |
# Default size: ~16 GB | |
DISK_SIZE="15361m" | |
#=========================================================================== | |
hdiutil create -o /tmp/Ventura.cdr -size $DISK_SIZE -layout SPUD -fs HFS+J | |
hdiutil attach /tmp/Ventura.cdr.dmg -noverify -mountpoint /Volumes/install_build | |
sudo "/Applications/Install macOS Ventura.app/Contents/Resources/createinstallmedia" --volume /Volumes/install_build --nointeraction | |
hdiutil detach "/Volumes/Shared Support" | |
hdiutil detach "/Volumes/Install macOS Ventura" | |
hdiutil convert /tmp/Ventura.cdr.dmg -format UDTO -o /tmp/Ventura.iso | |
mv /tmp/Ventura.iso.cdr ~/Desktop/Ventura.iso | |
rm /tmp/Ventura.cdr.dmg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment