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
#!/bin/sh | |
# Set the macOS installer path as a variable | |
MACOS_INSTALLER="/Applications/$(ls /Applications | grep "Install macOS")" | |
MOUNT_POINT="$MACOS_INSTALLER/Contents/SharedSupport" | |
echo "macOS installer is \"$MACOS_INSTALLER\"" | |
# Set the target disk as a variable | |
TARGET=$(diskutil info "$(bless --info --getBoot)" | awk -F':' '/Volume Name/ { print $2 }' | sed -e 's/^[[:space:]]*//') | |
echo "Target disk is \"$TARGET\"" |