Skip to content

Instantly share code, notes, and snippets.

@morenoh149
Created January 26, 2014 23:15
Show Gist options
  • Save morenoh149/8640751 to your computer and use it in GitHub Desktop.
Save morenoh149/8640751 to your computer and use it in GitHub Desktop.
Bash script to help create a bootable usb stick on OS X
#!/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