[Ubuntu] Install the latest two versions of GHC (#2696)

* install two ghc versions

* fix comments
This commit is contained in:
Dibir Magomedsaygitov
2021-02-13 09:22:36 +03:00
committed by GitHub
parent 77b21e0c24
commit 06559cab21
2 changed files with 4 additions and 4 deletions

View File

@@ -13,9 +13,9 @@ apt-get install -y software-properties-common
add-apt-repository -y ppa:hvr/ghc
apt-get update
# Get 3 latest Haskell Major.Minor versions
# Get 2 latest Haskell Major.Minor versions
allGhcVersions=$(apt-cache search "^ghc-" | grep -Po '(\d*\.){2}\d*' | sort --unique --version-sort)
ghcMajorMinorVersions=$(echo "$allGhcVersions" | cut -d "." -f 1,2 | sort --unique --version-sort | tail -3)
ghcMajorMinorVersions=$(echo "$allGhcVersions" | cut -d "." -f 1,2 | sort --unique --version-sort | tail -2)
for version in $ghcMajorMinorVersions; do
# Get latest patch version for given Major.Minor one (ex. 8.6.5 for 8.6) and install it