]> git.lyx.org Git - lyx.git/blobdiff - development/LyX-Mac-binary-release.sh
Try even harder to obtain an instant preview
[lyx.git] / development / LyX-Mac-binary-release.sh
index 4fb754740b99782739af5825b5597228b8466767..d26086efc07b170b0df0870ed7177d9c181f39ff 100644 (file)
@@ -185,7 +185,7 @@ while [ $# -gt 0 ]; do
                        export OBJC=gcc-4.0
                        export CXX=g++-4.0
                        ;;
-               10.5|10.6|10.7|10.8)
+               10.5|10.6|10.7|10.8|10.9|10.10)
                        SDKROOT="${DEVELOPER_SDKS}/MacOSX${SDKROOT}.sdk"
                        ;;
                *)
@@ -303,6 +303,11 @@ if [ -z "${LyXVersion}" ]; then
        LyXVersion=$(grep AC_INIT "${LyxSourceDir}"/configure.ac | cut -d, -f2 | tr -d " ()")
 fi
 LyXVersionSuffix=${LyXVersionSuffix:-$(echo "${LyXVersion}" | cut -d. -f1-2)}
+case "${LyXVersion}" in
+*dev*)
+       LyXGitCommitHash=$(cd "${LyxSourceDir}" ; git log -1 --pretty=format:%h)
+       ;;
+esac
 
 LyxName="LyX"
 LyxBase="${LyxName}-${LyXVersion}"
@@ -333,7 +338,7 @@ case "${QtVersion}" in
        ;;
 esac
 
-DMGNAME="${LyxBase}"
+DMGNAME="${LyxBase}${LyXGitCommitHash:+-}${LyXGitCommitHash}"
 DMGSIZE="550m"
 
 # Check for existing SDKs
@@ -860,7 +865,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"