X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=utils%2Fdev_macos_install.sh;fp=utils%2Fdev_macos_install.sh;h=5eadf0de0220522413a7a5542bb75c9faeb71928;hb=8946f41687f4c822ac8d15ee8551f23f156735c4;hp=0000000000000000000000000000000000000000;hpb=f27f7be4c32780de615e2678f11a5e80702c5e25;p=jalview.git diff --git a/utils/dev_macos_install.sh b/utils/dev_macos_install.sh new file mode 100755 index 0000000..5eadf0d --- /dev/null +++ b/utils/dev_macos_install.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash + +# perform a dev build and install on local macOS machine +INSTALLERVOL="Jalview Installer" +APP=Jalview.app + +APPLICATIONS=/Applications +CHANNEL=NOCHANNEL +DMG=build/install4j/1.8/Jalview-OFFLINE_macos-app_DEVELOPMENT-j8.dmg + +if [ $1 != "nogradle" ]; then + gradle installers -Pgetdown_channel_name=NOCHANNEL -Pinstall4jMediaTypes=macosArchive -Pgetdown_local=true -Pdev=true +else + echo "Not running gradle installers" +fi + +if [ $? = 0 ]; then + umount "/Volumes/$INSTALLERVOL" + if [ -e "$DMG" ]; then + open $DMG + else + echo "No DMG file '$DMG'" 1>&2 + exit 1 + fi + echo "Mounting '$DMG' at /Volumes" + N=0 + while [ \! -e "/Volumes/$INSTALLERVOL/$APP" ]; do + if [ $(( N%1000 )) = 0 ]; then + echo -n "." + fi + N=$(( N+1 )) + done + echo "" +fi +if [ -e "/Volumes/$INSTALLERVOL/$APP" ]; then + /bin/rm -r "$APPLICATIONS/$APP" + rsync -avh "/Volumes/$INSTALLERVOL/$APP" "$APPLICATIONS/" + umount "/Volumes/$INSTALLERVOL" +fi