]> git.lyx.org Git - lyx.git/commitdiff
improved mount state check
authorStephan Witt <switt@lyx.org>
Fri, 24 Oct 2014 16:14:42 +0000 (18:14 +0200)
committerStephan Witt <switt@lyx.org>
Fri, 24 Oct 2014 16:14:42 +0000 (18:14 +0200)
development/LyX-Mac-binary-release.sh

index 4fb754740b99782739af5825b5597228b8466767..958d801aefc378781ac1ab135217e872e8d9f4b3 100644 (file)
@@ -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"