We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4e7af53 commit c2b3e8fCopy full SHA for c2b3e8f
scripts/install-zstd.sh
@@ -1,6 +1,6 @@
1
sudo mkdir -p /opt/zstd
2
. /etc/os-release
3
-zstd_dir=$(curl -sL https://github.com/facebook/zstd/releases/latest | grep -Po "zstd-(\d+\.\d+\.\d+)" | head -n 1)
+zstd_dir="zstd-$(curl -sL https://github.com/facebook/zstd/releases/latest | grep -Po "tree/v(\d+\.\d+\.\d+)" | cut -d'v' -f 2 | head -n 1)"
4
zstd_url=$(curl -sL https://api.github.com/repos/"$REPO"/actions/artifacts | jq -r --arg zstd_dir "$zstd_dir-ubuntu$VERSION_ID" '.artifacts[] | select(.name=="\($zstd_dir)").archive_download_url' 2>/dev/null | head -n 1)
5
if [ "x$zstd_url" = "x" ]; then
6
sudo apt-get install zlib1g liblzma-dev liblz4-dev -y
@@ -18,4 +18,4 @@ else
18
fi
19
sudo ln -sf /opt/zstd/bin/* /usr/local/bin
20
sudo rm -rf /tmp/zstd*
21
-zstd -V
+zstd -V
0 commit comments