musescore-downloader/.github/workflows/get-signed-ext.sh
2020-10-30 17:32:58 -04:00

21 lines
387 B
Bash

API_URL=https://addons.mozilla.org/api/v4/addons/addon/$EXT_ID/versions/
# wait for maximum 15 min
for i in {1..15}
do
url=$(\
wget -q $API_URL -O - | \
jq -r ".results[] | select(.version==\"$VERSION\") | .files[0].url" \
)
if [ -n "$url" ]; then
echo "v$VERSION available!"
wget -nv $url
exit
else
echo "v$VERSION unavailable"
fi
sleep 1m
done