srmp/py.cpypy.sh

38 lines
1 KiB
Bash
Raw Normal View History

2024-09-28 21:56:18 +02:00
#! /usr/bin/env sh
2024-09-28 22:30:23 +02:00
file="$(readlink --canonicalize-existing "${0}")"
root="$(dirname "${file}")"
root="${root}/root/py/cpypy"
2024-09-28 21:56:18 +02:00
2025-03-15 14:15:23 +01:00
path="${root}/download-metadata.json"
url="https://github.com/astral-sh/uv/raw/refs/heads/main/crates/uv-python/download-metadata.json"
2024-09-28 21:56:18 +02:00
rm --force --recursive "${root}"
mkdir --parents "${root}"
2024-09-29 15:26:23 +02:00
wget --continue --output-document "${path}" "${url}" 2>/dev/null
echo
echo "${path}"
cat "${path}"
2024-09-28 21:56:18 +02:00
2024-09-29 15:42:16 +02:00
for url in $(jq -r ".. | objects | .url?" "${path}" |
2025-03-15 14:18:27 +01:00
grep "\(/20250311/\|/pypy3.11-v7.3.19\)" |
2025-02-23 17:55:27 +01:00
grep --invert-match "debug" |
2024-09-29 15:42:16 +02:00
grep --invert-match "\(armv7\|ppc64le\|s390x\)" |
2024-09-29 21:49:21 +02:00
grep --invert-match "\(apple-darwin\|macos\|win64\|windows-msvc\)"); do
2024-09-29 15:26:23 +02:00
case "$(basename "${url}")" in
2024-10-09 21:51:20 +02:00
cpython-3.13* | \
cpython-3.12* | \
cpython-3.11* | \
cpython-3.10* | \
2025-02-23 18:11:49 +01:00
pypy3.11*)
2024-09-29 15:26:23 +02:00
file="$(basename "${url}" | sed "s|%2B|+|g")"
dir="$(dirname "${url}")"
date="$(basename "${dir}")"
path="${root}/${date}"
mkdir --parents "${path}"
wget --continue --output-document "${path}/${file}" "${url}"
;;
*) ;;
esac
2024-09-28 21:56:18 +02:00
done