Sto cercando di creare iso per VMware Fusion usando snowyhack.sh con un'immagine che ho creato usando il mio disco di installazione di OS X 10.6. Quando si utilizza il comando sudo ./snowyhack.sh Mac\ OS\ X\ Install\ DVD.dmg
ottengo questo errore hdiutil: attach: extra image argument "OS" - "Mac" already specified
Il contenuto di snowyhack.sh:
#!/bin/bash
# Copyright Dave Parsons 2016
#set -x
set -e
set -E
# Check we have an input parameter
if [ "$#" -ne 1 ]
then
echo "Usage: snowyhack.sh path_to_dmg"
exit 1
fi
# The first argument is the path to the .app bundle (the input of the
# executable).
inputDMG="$1"
outputISO="${inputDMG%.*}.iso"
if [ ! -f "$inputDMG" ]
then
echo "$inputDMG not found."
exit 2
fi
echo Converting $inputDMG to $outputISO
# Clean up any shadow files
rm -f $inputDMG.shadow
# Attach DMG with shadow file
hdiutil attach $inputDMG -shadow -nobrowse
# Enable installer to boot
touch /Volumes/Mac\ OS\ X\ Install\ DVD/System/Library/CoreServices/ServerVersion.plist
# Add startup script to fix the target VM
cp rc.cdrom.local /Volumes/Mac\ OS\ X\ Install\ DVD/private/etc/
chmod +x /Volumes/Mac\ OS\ X\ Install\ DVD/private/etc/rc.cdrom.local
# Detach the mounted installer DMG
hdiutil detach /Volumes/Mac\ OS\ X\ Install\ DVD/
# Convert to ISO using the shadow file
hdiutil convert -format UDTO -o $outputISO $inputDMG -shadow
mv -fv $outputISO.cdr $outputISO
# Clean up any shadow files
rm -f $inputDMG.shadow