Skip to content

Commit

Permalink
more adjustments to mkbootable script on mac os x
Browse files Browse the repository at this point in the history
  • Loading branch information
gkovacs committed Jun 2, 2014
1 parent e5cca98 commit 8a89df4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/unetbootin/unetbootin.app/Contents/Resources/mkbootable
Expand Up @@ -10,7 +10,11 @@ else
echo "$syslinuxcmd $1"
syslinuxcmd=`echo "$0" | sed s/mkbootable/syslinux-mac/g`
"$syslinuxcmd" "$1"
sync
diskutil umount "$1"
sync
hdiutil unmount "$1"
sync
rawdev=`echo "$1" | sed "s/s[^s]*$//"`
partnum=`echo "$1" | perl -l -ne '/s[0-9]+(?!.*s)/ && print $&' | perl -l -ne '/[0-9]+/ && print $&'`
echo "partnum: $partnum rawdev: $rawdev"
Expand All @@ -22,6 +26,11 @@ quit
EOR
echo "writing mbr from $mbrfile to $rawdev"
mbrfile=`echo "$0" | sed s/mkbootable/mbr.bin/g`
sync
diskutil umount "$1"
sync
hdiutil unmount "$1"
sync
dd if="$mbrfile" of="$rawdev"
echo "done writing mbr"
fi

0 comments on commit 8a89df4

Please sign in to comment.