* yet another urlencoding fix

meow
Dominika 2022-05-21 01:27:03 +02:00
parent a422e84b6f
commit 49482466ac
1 changed files with 3 additions and 3 deletions

View File

@ -25,9 +25,9 @@ if [[ ! -d mods ]]; then
url="$(curl -s -H "x-api-key: $(cat $token)" \
"https://api.curseforge.com/v1/mods/$proj/files/$file" \
| jq -r '.data.downloadUrl' \
| sed 's/\[/%5b/g;s/\]/%5d/g;'"s/'/%27/g;s/ /%20/g")" #' handling for bad URLs
curl -s -o $(basename "$url") -L "$url" || echo "Failed to download $url" &
| jq -r '.data.downloadUrl')"
url_fix="$(sed 's/\[/%5b/g;s/\]/%5d/g;'"s/'/%27/g;s/ /%20/g" <<< "$url")" #' handling for bad URLs
curl -s -o "$(basename "$url")" -L "$url_fix" || echo "Failed to download $url" &
printf "."
done <<< "$mods"
wait