From 89d486e7765d545bf484a88673f96902dd258f8b Mon Sep 17 00:00:00 2001 From: Tachibana waita Date: Thu, 18 Feb 2021 03:04:50 +0900 Subject: [PATCH] [Ubuntu] Updating release file pattern for Kitware/CMake (#2731) --- images/linux/scripts/installers/cmake.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/images/linux/scripts/installers/cmake.sh b/images/linux/scripts/installers/cmake.sh index 3ad0f478..10b2287f 100644 --- a/images/linux/scripts/installers/cmake.sh +++ b/images/linux/scripts/installers/cmake.sh @@ -10,8 +10,8 @@ if command -v cmake; then echo "cmake is already installed" else json=$(curl -s "https://api.github.com/repos/Kitware/CMake/releases") - latest_tag=$(echo $json | jq -r '.[] | select(.prerelease==false).tag_name' | sort --unique --version-sort | tail -1) - sh_url=$(echo $json | jq -r ".[] | select(.tag_name==\"${latest_tag}\").assets[].browser_download_url | select(endswith(\"Linux-x86_64.sh\"))") + latest_tag=$(echo $json | jq -r '.[] | select(.prerelease==false).tag_name' | sort --unique --version-sort | grep -v "rc" | tail -1) + sh_url=$(echo $json | jq -r ".[] | select(.tag_name==\"${latest_tag}\").assets[].browser_download_url | select(endswith(\"inux-x86_64.sh\"))") curl -sL ${sh_url} -o cmakeinstall.sh \ && chmod +x cmakeinstall.sh \ && ./cmakeinstall.sh --prefix=/usr/local --exclude-subdir \