From ffc2370fde7a18fdaa08eed5ee34b8d30ec977a0 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 28 Sep 2024 21:56:18 +0200 Subject: [PATCH] cpypy --- py.cpypy.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 py.cpypy.sh diff --git a/py.cpypy.sh b/py.cpypy.sh new file mode 100755 index 0000000..2c8f3e7 --- /dev/null +++ b/py.cpypy.sh @@ -0,0 +1,23 @@ +#! /usr/bin/env sh + +root="/sw/python/cpypy" + +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}" +wget --continue --output-document "${path}" "${url}" + +for url in $(jq -r ".. | objects | .url?" "${path}" | + grep "\(cpython-3\.12\.6\|pypy3\.10\)" ); do + 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}" +done