From f9f73d5a467d8049cd14e799f136fb7af063d9f0 Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Fri, 17 May 2024 10:03:30 +0100 Subject: [PATCH] JAL-4409 corrected the umount of dmg to hdiutil detach to allow subsequent opening with other improvements --- utils/dev_macos_install.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/utils/dev_macos_install.sh b/utils/dev_macos_install.sh index 80cb94d..7c5fd15 100755 --- a/utils/dev_macos_install.sh +++ b/utils/dev_macos_install.sh @@ -104,7 +104,9 @@ else fi if [ $? = 0 ]; then - umount "/Volumes/$INSTALLERVOL" + if [ -e "/Volumes/$INSTALLERVOL" ]; then + hdiutil detach "/Volumes/$INSTALLERVOL" + fi if [ -e "$DMG" ]; then open $DMG else @@ -116,10 +118,14 @@ if [ $? = 0 ]; then MOUNTEDAPP="/Volumes/$INSTALLERVOL/$APP.app" echo "Waiting for '$MOUNTEDAPP' to appear" while [ \! -e "$MOUNTEDAPP" ]; do - if [ $(( N%1000 )) = 0 ]; then - echo -n "." - fi + echo -n "." N=$(( N+1 )) + if [ $N = 40 ]; then + echo "" + echo "Looks like something wrong with the DMG '$DMG'" + exit 4 + fi + sleep 0.1 done echo "" else @@ -133,5 +139,5 @@ if [ -e "$MOUNTEDAPP" ]; then echo "Syncing '$MOUNTEDAPP' to '$APPLICATIONS/'" rsync -avh "$MOUNTEDAPP" "$APPLICATIONS/" echo "Unmounting '/Volumes/$INSTALLERVOL'" - umount "/Volumes/$INSTALLERVOL" + hdiutil detach "/Volumes/$INSTALLERVOL" fi -- 1.7.10.2