File tree 1 file changed +24
-2
lines changed
1 file changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -13,11 +13,33 @@ main() {
13
13
14
14
local td
15
15
td=" $( mktemp -d) "
16
-
17
16
pushd " ${td} "
18
17
19
- curl --retry 3 -sSfL " https://github.com/Kitware/CMake/releases/download/v${version} /cmake-${version} -linux-x86_64.sh" -o cmake.sh
18
+ local cmake_arch
19
+ local cmake_sha256
20
+
21
+ local narch
22
+ narch=" $( dpkg --print-architecture) "
23
+
24
+ case " ${narch} " in
25
+ amd64)
26
+ cmake_arch=" linux-x86_64"
27
+ cmake_sha256=" da2a9b18c3bfb136917fa1a579aa5316b01c1d6c111043d03f18877ff05bda30"
28
+ ;;
29
+ arm64)
30
+ cmake_arch=" linux-aarch64"
31
+ cmake_sha256=" 86122bdfd030208aa36705ef421a218ccec52a14368020b2d67043af5e45490b"
32
+ ;;
33
+ * )
34
+ echo " Unsupported architecture: ${narch} " 1>&2
35
+ exit 1
36
+ ;;
37
+ esac
38
+
39
+ curl --retry 3 -sSfL " https://github.com/Kitware/CMake/releases/download/v${version} /cmake-${version} -${cmake_arch} .sh" -o cmake.sh
40
+ sha256sum --check <<< " ${cmake_sha256} cmake.sh"
20
41
sh cmake.sh --skip-license --prefix=/usr/local
42
+ cmake --version
21
43
22
44
popd
23
45
You can’t perform that action at this time.
0 commit comments