Skip to content

Commit

Permalink
fix cmake installation
Browse files Browse the repository at this point in the history
  • Loading branch information
prudhomm committed Dec 28, 2023
1 parent 2e9b7e8 commit 2b4ca25
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions feelpp-env/Dockerfile-cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
RUN 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 | 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 \
&& rm cmakeinstall.sh
SHELL ["/bin/bash", "-c"]
RUN json=$(curl -s "https://api.github.com/repos/Kitware/CMake/releases"); \
echo "JSON: $json"; \
latest_tag=$(echo $json | jq -r '.[] | select(.prerelease==false).tag_name' | sort --unique --version-sort | grep -v "rc" | tail -1); \
echo "Latest tag: $latest_tag"; \
sh_url=$(echo $json | jq -r ".[] | select(.tag_name==\"${latest_tag}\").assets[].browser_download_url | select(endswith(\"inux-x86_64.sh\"))"); \
echo "Download URL: $sh_url"; \
curl -sL ${sh_url} -o cmakeinstall.sh; \
chmod +x cmakeinstall.sh; \
./cmakeinstall.sh --prefix=/usr/local --exclude-subdir; \
rm cmakeinstall.sh
SHELL ["/bin/sh", "-c"]

0 comments on commit 2b4ca25

Please sign in to comment.