1# 2# Arm SCP/MCP Software 3# Copyright (c) 2024, Arm Limited and Contributors. All rights reserved. 4# 5# SPDX-License-Identifier: BSD-3-Clause 6# 7 8set -e 9 10tool_dir=$1 11version=$2 12hostarch=$(uname -m) 13 14toolchain="cmake-${version}-linux-${hostarch}" 15url="https://github.com/Kitware/CMake/releases/download/v${version}/${toolchain}.tar.gz" 16 17echo -e "Installing ${toolchain}\n" 18 19# Create target folder 20mkdir -p ${tool_dir} 21 22# Download 23wget -nv ${url} 24 25# Extract 26tar -xf ${toolchain}.tar.gz -C ${tool_dir} --strip-components=1 27 28# Clean up 29rm ${toolchain}.tar.gz 30