From 0e4de64d5e30260b5526a2999602762e923c9d25 Mon Sep 17 00:00:00 2001 From: Stephan Witt Date: Fri, 24 Oct 2014 18:14:42 +0200 Subject: [PATCH] improved mount state check --- development/LyX-Mac-binary-release.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/development/LyX-Mac-binary-release.sh b/development/LyX-Mac-binary-release.sh index 4fb754740b..958d801aef 100644 --- a/development/LyX-Mac-binary-release.sh +++ b/development/LyX-Mac-binary-release.sh @@ -860,7 +860,8 @@ make_dmg() { hdiutil create -type SPARSE -size ${DMGSIZE:-"250m"} -fs HFS+ -volname "${LyxBase}" "${DMGNAME}" # 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 hdiutil attach "${DMGNAME}.sparseimage"