Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. #!/bin/sh
  2. # Mount the installer image
  3. hdiutil attach /Applications/Install OS X Yosemite.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app
  4.  
  5. # Convert the boot image to a 8GB sparse bundle
  6. hdiutil convert /Volumes/install_app/BaseSystem.dmg -format UDSP -o /tmp/Yosemite
  7. hdiutil resize -size 8g /tmp/Yosemite.sparseimage
  8.  
  9. # Mount the sparse bundle for package addition
  10. hdiutil attach /tmp/Yosemite.sparseimage -noverify -nobrowse -mountpoint /Volumes/install_build
  11.  
  12. # Copy Packages and Base System files to the sparse bundle
  13. rm /Volumes/install_build/System/Installation/Packages
  14. cp -rp /Volumes/install_app/Packages /Volumes/install_build/System/Installation/
  15. cp -p /Volumes/install_app/BaseSystem* /Volumes/install_build/
  16.  
  17. # Unmount the installer image and sparse bundle
  18. hdiutil detach /Volumes/install_app
  19. hdiutil detach /Volumes/install_build
  20.  
  21. # Resize the partition in the sparse bundle to remove any free space
  22. hdiutil resize -size `hdiutil resize -limits /tmp/Yosemite.sparseimage | tail -n 1 | awk '{ print $1 }'`b /tmp/Yosemite.sparseimage
  23.  
  24. # Convert the sparse bundle to ISO/CD master
  25. hdiutil convert /tmp/Yosemite.sparseimage -format UDTO -o /tmp/Yosemite
  26. rm /tmp/Yosemite.sparseimage
  27. mv /tmp/Yosemite.cdr ~/Desktop/Yosemite.iso
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement