Skip to content

Instantly share code, notes, and snippets.

@ashee
Created April 4, 2012 13:17
Show Gist options
  • Save ashee/2301003 to your computer and use it in GitHub Desktop.
Save ashee/2301003 to your computer and use it in GitHub Desktop.
Fake mkisofs using hdiutil to appease CloudStack build in osx
#!/bin/sh
# Make sure to chmod +x this script and copy it somewhere in your path, ~/bin in my case
# CloudStack build (ant build-all) will invoke this script
ISO=$4
shift 4
CSTK=$(mktemp -d -t CloudStack.X)
for i in $*; do cp "$i" $CSTK; done
echo "hdiutil makehybrid -o $ISO.iso -hfs -joliet -iso $CSTK"
hdiutil makehybrid -o "$ISO" -hfs -joliet -iso $CSTK
rm -fr $CSTK
@Byron
Copy link

Byron commented Aug 6, 2016

This one worked for me on OSX with coreos 4.6.3.

#!/bin/sh

# Make sure to chmod +x this script and copy it somewhere in your path, ~/bin in my case
# CloudStack build (ant build-all) will invoke this script
ISO=$5
shift 5
hdiutil makehybrid -o "$ISO" -joliet -joliet-volume-name "config-2" -iso-volume-name "config-2" -iso $1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment