-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from hic-infra/matlab_runtime
MATLAB Runtime
- Loading branch information
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
|
||
|
||
# Installs a MATLAB runtime when the environment variable | ||
# MATLAB_RUNTIME is set to a runtime download URL (as a zip file). | ||
# | ||
# e.g. for MATLAB 2020a | ||
# MATLAB_RUNTIME=https://ssd.mathworks.com/supportfiles/downloads/R2020b/Release/8/deployment_files/installer/complete/glnxa64/MATLAB_Runtime_R2020b_Update_8_glnxa64.zip | ||
# | ||
# These links can be found here: | ||
# https://uk.mathworks.com/products/compiler/matlab-runtime.html | ||
|
||
set -eu | ||
|
||
name=$(echo "${MATLAB_RUNTIME}" | awk -F'/' '{ print $NF }') | ||
echo "Installing MATLAB runtime: ${name}" | ||
|
||
curl "${MATLAB_RUNTIME}" --output "/tmp/${name}" | ||
|
||
mkdir -p "/tmp/matlab_runtime" | ||
unzip "/tmp/${name}" -d "/tmp/matlab_runtime" | ||
rm "/tmp/${name}" | ||
|
||
pushd "/tmp/matlab_runtime" | ||
sudo ./install \ | ||
-agreeToLicense yes \ | ||
-mode silent | ||
popd | ||
|
||
rm -rf "/tmp/matlab_runtime" |