improved mount state check

This commit is contained in:
Stephan Witt 2014-10-24 18:14:42 +02:00
parent ef51c22ddf
commit 0e4de64d5e

View File

@ -860,7 +860,8 @@ make_dmg() {
hdiutil create -type SPARSE -size ${DMGSIZE:-"250m"} -fs HFS+ -volname "${LyxBase}" "${DMGNAME}" hdiutil create -type SPARSE -size ${DMGSIZE:-"250m"} -fs HFS+ -volname "${LyxBase}" "${DMGNAME}"
# Unmount currently mounted disk image # Unmount currently mounted disk image
test -d /Volumes/"${LyxBase}" && umount /Volumes/"${LyxBase}" mount | grep "${LyxBase}" && umount /Volumes/"${LyxBase}"
test -d /Volumes/"${LyxBase}" && rmdir /Volumes/"${LyxBase}"
# Mount the disk image # Mount the disk image
hdiutil attach "${DMGNAME}.sparseimage" hdiutil attach "${DMGNAME}.sparseimage"