Created
January 26, 2014 23:15
-
-
Save morenoh149/8640751 to your computer and use it in GitHub Desktop.
Bash script to help create a bootable usb stick on OS X
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/bash | |
HELP_STR="please provide location of .iso" | |
if [ "$#" -lt 1 ]; then | |
echo $HELP_STR | |
else | |
echo "`diskutil list`" | |
echo "===============" | |
echo "enter disk to eject" | |
echo -e ">> \c" | |
read word | |
echo "ejecting: $word" | |
echo "`diskutil unmountDisk $word`" | |
echo "copying $1 to $word note this may take a while and there won't be a progress bar" | |
echo "`sudo dd if=$1 of=$word bs=1m`" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment