-
Notifications
You must be signed in to change notification settings - Fork 2
/
install.sh
33 lines (23 loc) · 905 Bytes
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#! /usr/bin/env bash
set -ex
CMAKE_VERSION="${VERSION:-latest}";
# Ensure we're in this feature's directory during build
cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )";
# install global/common scripts
. ./common/install.sh;
check_packages jq wget ca-certificates bash-completion pkg-config;
echo "Downloading CMake...";
if [[ "${CMAKE_VERSION}" == "latest" ]]; then
find_version_from_git_tags CMAKE_VERSION https://github.com/Kitware/CMake;
fi
wget --no-hsts -q -O /tmp/cmake_${CMAKE_VERSION}.sh \
https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-$(uname -m).sh;
echo "Installing CMake...";
# Install CMake
bash /tmp/cmake_${CMAKE_VERSION}.sh --skip-license --exclude-subdir --prefix=/usr;
# Clean up
# rm -rf /tmp/*;
rm -rf /var/tmp/*;
rm -rf /var/cache/apt/*;
rm -rf /var/lib/apt/lists/*;
rm -rf /tmp/cmake_${CMAKE_VERSION}.sh;