From 6b54f646c659b74d10c85c8d9e984ae2297d1a59 Mon Sep 17 00:00:00 2001 From: Stephan Witt Date: Fri, 14 Apr 2017 22:14:21 +0200 Subject: [PATCH] LyX build for Mac - more readable disk mount management --- development/LyX-Mac-binary-release.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/development/LyX-Mac-binary-release.sh b/development/LyX-Mac-binary-release.sh index 92c7f2f452..3617b93f92 100644 --- a/development/LyX-Mac-binary-release.sh +++ b/development/LyX-Mac-binary-release.sh @@ -943,12 +943,11 @@ make_dmg() { test -d /Volumes/"${LyxBase}" && rmdir /Volumes/"${LyxBase}" # Mount the disk image - hdiutil attach "${DMGNAME}.sparseimage" + DEVICES=$(hdiutil attach "${DMGNAME}.sparseimage" | cut -f 1) # Obtain device information - DEVS=$(hdiutil attach "${DMGNAME}.sparseimage" | cut -f 1) - DEV=$(echo $DEVS | cut -f 1 -d ' ') - VOLUME=$(mount |grep ${DEV} | cut -f 3 -d ' ') + DEVICE=$(echo $DEVICES | cut -f 1 -d ' ') + VOLUME=$(mount |grep ${DEVICE} | cut -f 3 -d ' ') # copy in the application bundle cp -Rp "${LyxAppDir}.app" "${VOLUME}/${LyxName}.app" @@ -964,7 +963,7 @@ make_dmg() { mv "${VOLUME}/Pictures" "${VOLUME}/.Pictures" # Unmount the disk image - hdiutil detach ${DEV} + hdiutil detach ${DEVICE} # Convert the disk image to read-only hdiutil convert "${DMGNAME}.sparseimage" -format UDBZ -o "${DMGNAME}.dmg"