diff options
author | davidovski <david@davidovski.xyz> | 2022-03-06 15:21:10 +0000 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2022-03-06 15:21:10 +0000 |
commit | 75e7bb9c72d562d397f9fb62072ab114cfbc6244 (patch) | |
tree | c2af33a2c487d2b411e3be0900f675c41ca5ab4f /auto/pypi.sh | |
parent | ce1ac2b89b42e4e05ba706b7bbdcc39cd2e64e8b (diff) |
fixed python compilation for js78
Diffstat (limited to 'auto/pypi.sh')
-rwxr-xr-x | auto/pypi.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/auto/pypi.sh b/auto/pypi.sh index f6c554b..c3edeaf 100755 --- a/auto/pypi.sh +++ b/auto/pypi.sh @@ -9,12 +9,14 @@ else name=$1 fi -if ! pip show $name > /dev/null; then +json_url=https://pypi.org/pypi/$name/json + +if [ "$(curl -s -o /dev/null -w "%{http_code}" $json_url)" != 200 ] ; then echo "Failed to find $name" exit 1 fi -json=$(curl -SsL https://pypi.org/pypi/$name/json) +json=$(curl -SsL $json_url) version=$(echo $json | jq -r '.info.version') desc=$(echo $json | jq -r '.info.summary') url=$(echo $json | jq -r '.urls[] | select((.version="1.0.3")) | .url' | grep -v "whl" | sed "s/$version/\$PKG_VER/g") |