Fix download not handling files with spaces in names correctly

This commit is contained in:
Felix Kröner 2024-12-04 19:01:52 +01:00
parent 615f72e7fa
commit 44fea6428c

View file

@ -173,7 +173,7 @@ download() {
echo "Downloading tagged release ${TAG}" echo "Downloading tagged release ${TAG}"
api GET repos/$REPO/releases/tags/"$TAG" > "$TMP_DIR"/assets.json api GET repos/$REPO/releases/tags/"$TAG" > "$TMP_DIR"/assets.json
fi fi
jq --raw-output '.assets[] | "\(.name) \(.browser_download_url)"' < "$TMP_DIR"/assets.json | while read name url ; do jq --raw-output '.assets[] | "\(.browser_download_url) \(.name)"' < "$TMP_DIR"/assets.json | while read url name ; do
curl --fail -H "Authorization: token $TOKEN" -o "$name" -L "$url" curl --fail -H "Authorization: token $TOKEN" -o "$name" -L "$url"
done done
) )