mirror of
https://github.com/actions/runner-images.git
synced 2025-12-14 22:05:17 +00:00
[ubuntu] Refactor bash functions (#9055)
This commit is contained in:
committed by
GitHub
parent
d16bc5f120
commit
503ae89818
@@ -6,22 +6,15 @@
|
||||
source $HELPER_SCRIPTS/install.sh
|
||||
source $HELPER_SCRIPTS/os.sh
|
||||
|
||||
function InstallFortran {
|
||||
version=$1
|
||||
|
||||
echo "Installing $version..."
|
||||
apt-get install $version -y
|
||||
}
|
||||
|
||||
# Install GNU Fortran compiler
|
||||
add-apt-repository ppa:ubuntu-toolchain-r/test -y
|
||||
apt-get update -y
|
||||
|
||||
versions=$(get_toolset_value '.gfortran.versions[]')
|
||||
|
||||
for version in ${versions[*]}
|
||||
do
|
||||
InstallFortran $version
|
||||
for version in ${versions[*]}; do
|
||||
echo "Installing $version..."
|
||||
apt-get install $version -y
|
||||
done
|
||||
|
||||
invoke_tests "Tools" "gfortran"
|
||||
|
||||
Reference in New Issue
Block a user