mirror of
https://github.com/MLBZ521/MacAdmin.git
synced 2026-03-20 16:00:25 +00:00
+ Fixed various issues found after further testing for Matlab 2017b - Remove the argument '-mode silent' from install line; added it back to the installer_input file + The 'staging' method from the last revision for the network.lic file did not work, as Matlab does not 'look' for it until it's first launch, which, at that time, the network.lic file is gone (it's pointing to the tempoary unpack directory of the pkg)
43 lines
1.5 KiB
Bash
43 lines
1.5 KiB
Bash
#!/bin/sh
|
|
|
|
###################################################################################################
|
|
# Script Name: install_MatLab.sh
|
|
# By: Zack Thompson / Created: 3/6/2017
|
|
# Version: 1.2.1 / Updated: 12/6/2017 / By: ZT
|
|
#
|
|
# Description: This script is used to install and activate MatLab with a Network License Server.
|
|
#
|
|
###################################################################################################
|
|
|
|
/bin/echo "**************************************************"
|
|
/bin/echo "***** Install process: START *****"
|
|
/bin/echo "**************************************************"
|
|
|
|
# Set working directory
|
|
pkgDir=$(/usr/bin/dirname $0)
|
|
|
|
# Install MatLab via built-in script and option file.
|
|
/bin/echo "Installing MatLab..."
|
|
./Matlab_2017b_Mac/InstallForMacOSX.app/Contents/MacOS/InstallForMacOSX -inputFile ./installer_input.txt
|
|
exitStatus=$?
|
|
|
|
if [[ $exitStatus == 0 ]]; then
|
|
/bin/echo "Install completed successfully!"
|
|
/bin/echo "Copying over the license..."
|
|
/bin/cp ${pkgDir}/network.lic /Applications/MATLAB_R2017b.app/licenses/
|
|
/bin/echo "License copied."
|
|
else
|
|
/bin/echo "Install failed!"
|
|
/bin/echo "**************************************************"
|
|
/bin/echo "***** Install process: FAILED *****"
|
|
/bin/echo "**************************************************"
|
|
|
|
exit 1
|
|
fi
|
|
|
|
/bin/echo "**************************************************"
|
|
/bin/echo "***** Install process: COMPLETE *****"
|
|
/bin/echo "**************************************************"
|
|
|
|
exit 0
|