Fix apt-get command for installing specific version of cmake based on distro of ubuntu

This commit is contained in:
spham
2021-04-19 14:56:54 -07:00
parent 4232fa4232
commit 86be2647c5
@@ -41,7 +41,6 @@ fi
#
# Always install the latest version of cmake (from kitware)
#
CMAKE_DISTRO_VERSION=3.20.1-0kitware1ubuntu20.04.1
echo Installing CMake package $CMAKE_DISTRO_VERSION
# Remove any pre-existing version of cmake
@@ -52,9 +51,11 @@ CMAKE_DEB_REPO="'deb https://apt.kitware.com/ubuntu/ $UBUNTU_DISTRO main'"
# Add the appropriate kitware repository to apt
if [ "$UBUNTU_DISTRO" == "bionic" ]
then
CMAKE_DISTRO_VERSION=3.20.1-0kitware1ubuntu20.04.1
apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main'
elif [ "$UBUNTU_DISTRO" == "focal" ]
then
CMAKE_DISTRO_VERSION=3.20.1-0kitware1ubuntu18.04.1
apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main'
fi
apt-get update