musescore-downloader/.github/workflows/get-signed-ext.sh

22 lines
405 B
Bash
Raw Normal View History

2020-10-30 21:32:58 +00:00
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!"
2020-10-30 21:38:04 +00:00
wget -nv $url -P ${OUT_DIR:-./}
2020-10-30 21:32:58 +00:00
exit
else
echo "v$VERSION unavailable"
fi
sleep 1m
done