Files
runner-images/images/linux/scripts/installers/gfortran.sh
Vladimir Safonkin 7b3bfbdf61 [Ubuntu] Remove docs logic from Ubuntu provisioner (#1603)
* Remove docs logic on Ubuntu

* Cleanup templates

* Fix oras-cli.sh

* Remove announcements.md
2020-09-17 14:15:31 +03:00

35 lines
817 B
Bash

#!/bin/bash
################################################################################
## File: gfortran.sh
## Desc: Installs GNU Fortran
################################################################################
function InstallFortran {
version=$1
echo "Installing $version..."
apt-get install $version -y
# Run tests to determine that the software installed as expected
echo "Testing to make sure that script performed as expected, and basic scenarios work"
if ! command -v $version; then
echo "$version was not installed"
exit 1
fi
}
# Install GNU Fortran compiler
add-apt-repository ppa:ubuntu-toolchain-r/test -y
apt-get update -y
versions=(
"gfortran-8"
"gfortran-9"
)
for version in ${versions[*]}
do
InstallFortran $version
done