JAL-4421 Update the dev_masos_installer.sh to use new Volume name bug/JAL-4421_customise_volume_name_of_DMG_installers
authorBen Soares <b.soares@dundee.ac.uk>
Fri, 7 Jun 2024 11:20:40 +0000 (12:20 +0100)
committerBen Soares <b.soares@dundee.ac.uk>
Fri, 7 Jun 2024 11:20:40 +0000 (12:20 +0100)
utils/dev_macos_install.sh

index 7c5fd15..1bdcc94 100755 (executable)
@@ -92,8 +92,10 @@ if [ -z $APP ]; then
       ;;
   esac
 fi
+WC=""
 if [ -z $INSTALLERVOL ]; then
-  INSTALLERVOL="${APP} Installer"
+  INSTALLERVOL="Install ${APP}"
+  WC="*"
 fi
 
 if [ "${GRADLE}" = 1 ]; then
@@ -115,9 +117,9 @@ if [ $? = 0 ]; then
   fi
   echo "Mounting '$DMG' at /Volumes"
   N=0
-  MOUNTEDAPP="/Volumes/$INSTALLERVOL/$APP.app"
+  MOUNTEDAPP="/Volumes/$INSTALLERVOL$WC/$APP.app"
   echo "Waiting for '$MOUNTEDAPP' to appear"
-  while [ \! -e "$MOUNTEDAPP" ]; do
+  while [ "$(ls -1 "/Volumes/$INSTALLERVOL"$WC"/$APP.app" 2>/dev/null)" = "" ]; do
     echo -n "."
     N=$(( N+1 ))
     if [ $N = 40 ]; then
@@ -127,6 +129,10 @@ if [ $? = 0 ]; then
     fi
     sleep 0.1
   done
+  INSTALLERVOL="$(ls -1d "/Volumes/Install Jalview Develop "* 2>/dev/null | head -1)"
+  INSTALLERVOL=${INSTALLERVOL%/}
+  INSTALLERVOL=${INSTALLERVOL#/Volumes/}
+  MOUNTEDAPP="/Volumes/$INSTALLERVOL/$APP.app"
   echo ""
 else
   echo "Problem with gradle build: exit code $?"