Skip to content

Commit c2b3e8f

Browse files
authored
Fix zstd_dir [skip ci]
1 parent 4e7af53 commit c2b3e8f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/install-zstd.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
sudo mkdir -p /opt/zstd
22
. /etc/os-release
3-
zstd_dir=$(curl -sL https://github.com/facebook/zstd/releases/latest | grep -Po "zstd-(\d+\.\d+\.\d+)" | head -n 1)
3+
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)"
44
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)
55
if [ "x$zstd_url" = "x" ]; then
66
sudo apt-get install zlib1g liblzma-dev liblz4-dev -y
@@ -18,4 +18,4 @@ else
1818
fi
1919
sudo ln -sf /opt/zstd/bin/* /usr/local/bin
2020
sudo rm -rf /tmp/zstd*
21-
zstd -V
21+
zstd -V

0 commit comments

Comments
 (0)