OSX packaging: fix disk-image "Resource busy"

see http://lists.apple.com/archives/darwin-dev/2008/Sep/msg00030.html
This commit is contained in:
Robin Gareus 2015-02-02 18:46:26 +01:00
parent 3e6eaa0656
commit 23622f4fba
1 changed files with 1 additions and 1 deletions

View File

@ -646,7 +646,7 @@ trap "rm -rf $MNTPATH $TMPDMG ${TMPDMG}.dmg $ICNSTMP" EXIT
hdiutil create -megabytes $DMGMEGABYTES "$TMPDMG"
DiskDevice=$(hdid -nomount "$TMPDMG" | grep Apple_HFS | cut -f 1 -d ' ')
newfs_hfs -v "${VOLNAME}" "${DiskDevice}"
mount -t hfs "${DiskDevice}" "${MNTPATH}"
mount -t hfs -o nobrowse "${DiskDevice}" "${MNTPATH}"
cp -r ${PRODUCT_PKG_DIR}/* "${MNTPATH}" || exit
mkdir "${MNTPATH}/.background"