JAL-3878 Add full name getter to ActionI
[jalview.git] / utils / dev_macos_install.sh
1 #!/usr/bin/env bash
2
3 # perform a dev build and install on local macOS machine
4 INSTALLERVOL="Jalview Installer"
5 APP=Jalview.app
6
7 APPLICATIONS=$HOME/Applications
8 CHANNEL=NOCHANNEL
9 DMG=build/install4j/11/Jalview-OFFLINE_macos-app_DEVELOPMENT-j11.dmg
10
11 if [ x$1 != "xnogradle" ]; then
12   gradle installers -PCHANNEL=LOCAL -Pinstall4j_media_types=macosArchive
13 else
14   echo "Not running gradle installers"
15 fi
16
17 if [ $? = 0 ]; then
18   umount "/Volumes/$INSTALLERVOL"
19   if [ -e "$DMG" ]; then
20     open $DMG
21   else
22     echo "No DMG file '$DMG'" 1>&2
23     exit 1
24   fi
25   echo "Mounting '$DMG' at /Volumes"
26   N=0
27   while [ \! -e "/Volumes/$INSTALLERVOL/$APP" ]; do
28     if [ $(( N%1000 )) = 0 ]; then
29       echo -n "."
30     fi
31     N=$(( N+1 ))
32   done
33   echo ""
34 fi
35 if [ -e "/Volumes/$INSTALLERVOL/$APP" ]; then
36   /bin/rm -r "$APPLICATIONS/$APP"
37   rsync -avh "/Volumes/$INSTALLERVOL/$APP" "$APPLICATIONS/"
38   umount "/Volumes/$INSTALLERVOL"
39 fi