Notes
![]() ![]() Notes - notes.io |
ESD=$1
TMP=$2
if [ -z "$ESD" ] || [ -z "$TMP" ]; then
echo usage: "'$0' /path/to/esd /path/to/tmpdir"
exit 1
fi
if ! [ -e "$ESD" ]; then
echo "file '$ESD' does not exist"
exit 1
fi
if ! [ -e "$TMP" ]; then
echo "dir '$TMP' does not exist"
exit 1
fi
MPAPP=/Volumes/install_app
MPIMG=/Volumes/install_img
IMGSPARSE=$TMP/install.sparseimage
IMGDVD=$TMP/install.cdr
detach_all() {
if [ -d "$MPAPP" ]; then hdiutil detach "$MPAPP"; fi
if [ -d "$MPIMG" ]; then hdiutil detach "$MPIMG"; fi
}
exit_all() {
echo +++ Command returned with error, aborting ...
exit 2
}
trap detach_all EXIT
trap exit_all ERR
echo +++ Trying to unmount anything from previous run
detach_all
echo +++ Mount the installer image
hdiutil attach "$ESD" -noverify -nobrowse -readonly -mountpoint "$MPAPP"
echo +++ Convert the boot image to a sparse bundle
rm -f "$IMGSPARSE"
hdiutil convert "$MPAPP"/BaseSystem.dmg -format UDSP -o "$IMGSPARSE"
echo +++ Increase the sparse bundle capacity to accommodate the packages
hdiutil resize -size 6g "$IMGSPARSE"
echo +++ Mount the sparse bundle for package addition
hdiutil attach "$IMGSPARSE" -noverify -nobrowse -readwrite -mountpoint "$MPIMG"
echo +++ Remove Package link and replace with actual files
rm -f "$MPIMG"/System/Installation/Packages
cp -rp "$MPAPP"/Packages "$MPIMG"/System/Installation/
echo +++ Unmount the installer image
hdiutil detach "$MPAPP"
echo +++ Unmount the sparse bundle
hdiutil detach "$MPIMG"
echo +++ Resize the partition in the sparse bundle to remove any free space
hdiutil resize -sectors min "$IMGSPARSE"
echo +++ Convert the sparse bundle to ISO/CD master
rm -f "$IMGDVD"
hdiutil convert "$IMGSPARSE" -format UDTO -o "$IMGDVD"
echo +++ Remove the sparse bundle
rm "$IMGSPARSE"
echo "Done"
echo "Find your DVD at '$IMGDVD'"
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team