Skip to content

Commit

Permalink
Merge pull request #855 from KrisThielemans/VB_CMake_script
Browse files Browse the repository at this point in the history
minor changes in VirtualBox to allow manual specification of CMake version
  • Loading branch information
KrisThielemans authored Feb 7, 2024
2 parents 236649a + 17d3b55 commit 80f9eda
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions VirtualBox/scripts/INSTALL_CMake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
# optional first argument is location (e.g. /usr/local (default), $HOME)
# If using a system location, execute with sudo
# You need to make sure the resulting location will be in your path
# If you want to select the CMake version, set the "ver" environment variable

# Authors: Ben Thomas, Kris Thielemans
# Copyright 2017-2018 University College London
# Copyright 2017-2018, 2024 University College London

set -e
if [ $# -eq 0 ]
Expand All @@ -14,15 +15,17 @@ then
else
INSTALL_LOC=$1
fi
ver=3.21.3
# default version, but can be set externally
: ${ver=3.21.3}

echo "Downloading CMake $ver in /tmp"
cd /tmp
# next location could be for older releases (although 3.7.2 was in a 3.7 dir, not 3.7.2)
# wget -c https://cmake.org/files/${ver}/cmake-${ver}-Linux-x86_64.tar.gz
wget -c https://github.com/Kitware/CMake/releases/download/v${ver}/cmake-${ver}-Linux-x86_64.tar.gz
wget -c "https://github.com/Kitware/CMake/releases/download/v${ver}/cmake-${ver}-Linux-x86_64.tar.gz"

echo "Installing CMake $ver in ${INSTALL_LOC}"
cd ${INSTALL_LOC}
tar xzf /tmp/cmake-${ver}-Linux-x86_64.tar.gz --strip 1
rm /tmp/cmake-${ver}-Linux-x86_64.tar.gz
mkdir -p "$INSTALL_LOC"
cd "$INSTALL_LOC"
tar xzf "/tmp/cmake-${ver}-Linux-x86_64.tar.gz" --strip 1
rm "/tmp/cmake-${ver}-Linux-x86_64.tar.gz"

0 comments on commit 80f9eda

Please sign in to comment.