2024-09-28 19:56:18 +00:00
|
|
|
#! /usr/bin/env sh
|
|
|
|
|
2024-09-28 20:30:23 +00:00
|
|
|
file="$(readlink --canonicalize-existing "${0}")"
|
|
|
|
root="$(dirname "${file}")"
|
|
|
|
root="${root}/root/py/cpypy"
|
2024-09-28 19:56:18 +00:00
|
|
|
|
|
|
|
data="download-metadata.json"
|
|
|
|
|
|
|
|
path="${root}/${data}"
|
|
|
|
url="https://github.com\
|
|
|
|
/astral-sh/uv/raw/refs/heads/main/crates/uv-python/${data}"
|
|
|
|
|
|
|
|
rm --force --recursive "${root}"
|
|
|
|
mkdir --parents "${root}"
|
2024-09-29 13:26:23 +00:00
|
|
|
wget --continue --output-document "${path}" "${url}" 2>/dev/null
|
|
|
|
echo
|
|
|
|
echo "${path}"
|
|
|
|
cat "${path}"
|
2024-09-28 19:56:18 +00:00
|
|
|
|
2024-09-29 13:26:23 +00:00
|
|
|
for url in $(jq -r ".. | objects | .url?" "${path}"); do
|
|
|
|
case "$(basename "${url}")" in
|
|
|
|
cpython-3.12* |
|
|
|
|
cpython-3.11* |
|
|
|
|
cpython-3.10* |
|
|
|
|
pypy3.10*)
|
|
|
|
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 19:56:18 +00:00
|
|
|
done
|