Skip to content

Commit

Permalink
Merge pull request #4 from rbdavison/master
Browse files Browse the repository at this point in the history
Fix for creating disk images of the correct size
  • Loading branch information
andreyvit committed Dec 22, 2011
2 parents da94f0e + bd29cc7 commit cce1e9c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion create-dmg
Expand Up @@ -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'`
DISK_IMAGE_SIZE=$(expr $ACTUAL_SIZE + 20)
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..."
Expand Down

0 comments on commit cce1e9c

Please sign in to comment.