Browse files

Merge pull request #4 from rbdavison/master

Fix for creating disk images of the correct size
  • Loading branch information...
2 parents da94f0e + bd29cc7 commit cce1e9c06739b538d53cea19487d93ce4e268282 @andreyvit committed Dec 22, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 create-dmg
@@ -120,7 +120,9 @@ fi
# Create the image
echo "Creating disk image..."
test -f "${DMG_TEMP_NAME}" && rm -f "${DMG_TEMP_NAME}"
-hdiutil create -srcfolder "$SRC_FOLDER" -volname "${VOLUME_NAME}" -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDRW -size 300m "${DMG_TEMP_NAME}"
+ACTUAL_SIZE=`du -sm dmg | sed -e 's/ .*//g'`
+hdiutil create -srcfolder "$SRC_FOLDER" -volname "${VOLUME_NAME}" -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDRW -size ${DISK_IMAGE_SIZE}m "${DMG_TEMP_NAME}"
# mount it
echo "Mounting disk image..."

0 comments on commit cce1e9c

Please sign in to comment.