From: Ben Soares Date: Fri, 17 May 2024 09:03:30 +0000 (+0100) Subject: JAL-4409 corrected the umount of dmg to hdiutil detach to allow subsequent opening... X-Git-Tag: Release_2_11_4_0~28^2~21 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=f9f73d5a467d8049cd14e799f136fb7af063d9f0;p=jalview.git JAL-4409 corrected the umount of dmg to hdiutil detach to allow subsequent opening with other improvements --- 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