forked from devcontainers-extra/features
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
路29 lines (23 loc) 路 994 Bytes
/
Copy pathinstall.sh
File metadata and controls
executable file
路29 lines (23 loc) 路 994 Bytes
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
#!/usr/bin/env bash
set -e
source ./library_scripts.sh
# nanolayer is a cli utility which keeps container layers as small as possible
# source code: https://github.com/devcontainers-extra/nanolayer
# `ensure_nanolayer` is a bash function that will find any existing nanolayer installations,
# and if missing - will download a temporary copy that automatically get deleted at the end
# of the script
ensure_nanolayer nanolayer_location "v0.5.6"
# The releases of Kitware/CMake are prefixed with a 'v' character
# So if it's not the latest version, we need to add it
if [ "${VERSION}" != "latest" ]; then
VERSION="v${VERSION}"
fi
# Install cmake via GitHub Release feature
$nanolayer_location \
install \
devcontainer-feature \
"ghcr.io/devcontainers-extra/features/gh-release:1.0.25" \
--option repo='Kitware/CMake' --option binaryNames='cmake,ctest,cpack' \
--option libName='cmake' --option assetRegex='.*tar.gz$' \
--option version="${VERSION}"
echo 'Done!'