Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # Mount the installer image
- hdiutil attach /Applications/Install OS X Yosemite.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app
- # Convert the boot image to a 8GB sparse bundle
- hdiutil convert /Volumes/install_app/BaseSystem.dmg -format UDSP -o /tmp/Yosemite
- hdiutil resize -size 8g /tmp/Yosemite.sparseimage
- # Mount the sparse bundle for package addition
- hdiutil attach /tmp/Yosemite.sparseimage -noverify -nobrowse -mountpoint /Volumes/install_build
- # Copy Packages and Base System files to the sparse bundle
- rm /Volumes/install_build/System/Installation/Packages
- cp -rp /Volumes/install_app/Packages /Volumes/install_build/System/Installation/
- cp -p /Volumes/install_app/BaseSystem* /Volumes/install_build/
- # Unmount the installer image and sparse bundle
- hdiutil detach /Volumes/install_app
- hdiutil detach /Volumes/install_build
- # Resize the partition in the sparse bundle to remove any free space
- hdiutil resize -size `hdiutil resize -limits /tmp/Yosemite.sparseimage | tail -n 1 | awk '{ print $1 }'`b /tmp/Yosemite.sparseimage
- # Convert the sparse bundle to ISO/CD master
- hdiutil convert /tmp/Yosemite.sparseimage -format UDTO -o /tmp/Yosemite
- rm /tmp/Yosemite.sparseimage
- mv /tmp/Yosemite.cdr ~/Desktop/Yosemite.iso
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement