-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changelog: - Modify scripts to use bash arrays. This makes it easier to comment out and replace the various arguments. All the scripts were checked with shellcheck.
- Loading branch information
Showing
40 changed files
with
448 additions
and
249 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Create a "ISO" (DMG) image for powering offline macOS installations | ||
|
||
# Bail at first ISO creation error | ||
set -e | ||
|
||
display_help() { | ||
echo "Usage: $(basename $0) [-h] [<path/to/install_app.app> <path/to/output_iso_file.iso>]" | ||
exit 0 | ||
} | ||
|
||
if [ "$1" == "-h" ] ; then | ||
display_help | ||
fi | ||
|
||
if [ "$#" -eq 2 ] | ||
then | ||
in_path=$1 | ||
dmg_path=$2 | ||
elif [ "$#" -eq 0 ] | ||
then | ||
in_path=/Applications/Install\ macOS\ Mojave.app | ||
dmg_path=~/Desktop/Mojave.dmg | ||
echo "Using default paths:" | ||
echo "Install app: $in_path" | ||
echo "Output disk: $dmg_path" | ||
else | ||
display_help | ||
fi | ||
|
||
# Borrrowed from multiple internet sources | ||
hdiutil create -o "$dmg_path" -size 7g -layout GPTSPUD -fs HFS+J | ||
hdiutil attach "$dmg_path" -noverify -mountpoint /Volumes/install_build | ||
sudo "$in_path/Contents/Resources/createinstallmedia" --volume /Volumes/install_build --nointeraction | ||
|
||
# createinstallmedia may leave a bunch of subvolumes still mounted when it exits, so we need to use -force here. | ||
hdiutil detach --force "/Volumes/Install macOS Mojave" |
Oops, something went wrong.