-
-
Save eggfly/bb68d9e048644a1cbdcb3b4ef00e5534 to your computer and use it in GitHub Desktop.
Add a partition to VMWare Virtual Disk
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 | |
GamePartitionUUID='E7F33C26-2F83-41B2-B601-E9BF29AF9C09' | |
device=$(diskutil info "$GamePartitionUUID" | sed -n 's/.*Device Identifier: *//p') | |
if [[ -z "$device" ]]; then | |
echo "Impossible de déterminer la partition 'Games' avec l'UUID $GamePartitionUUID !" >&2 | |
exit 1 | |
fi | |
disk="${device%s*}" | |
part="${device##*s}" | |
rm -f GamePartition* | |
"/Applications/VMware Fusion.app/Contents/Library/vmware-rawdiskCreator" create /dev/$disk $part GamePartition ide | |
if [[ $(grep -c 'GamePartition.vmdk' 'Boot Camp.vmx') -eq 0 ]]; then | |
echo 'ide1:0.present = "TRUE"' >> 'Boot Camp.vmx' | |
echo 'ide1:0.fileName = "GamePartition.vmdk"' >> 'Boot Camp.vmx' | |
echo 'ide1:0.deviceType = "rawDisk"' >> 'Boot Camp.vmx' | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment