Skip to content

Commit

Permalink
add download debug information
Browse files Browse the repository at this point in the history
  • Loading branch information
zekroTJA committed Apr 23, 2024
1 parent c2d0635 commit d4a7ce7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scripts/download-latest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,17 @@ APP_ID="715572"

latest_id=$(curl -Ls "https://www.curseforge.com/api/v1/mods/$APP_ID/files?pageIndex=0&pageSize=1&sort=dateCreated&sortDescending=true&removeAlphas=true" \
| jq '.data[0].id')

echo "-- Latest ID: $latest_id"

server_id=$(curl -Ls "https://www.curseforge.com/api/v1/mods/$APP_ID/files/$latest_id/additional-files" \
| jq '.data[0].id')

echo "-- Server ID: $server_id"

file_name=$(curl -Ls "https://www.curseforge.com/api/v1/mods/$APP_ID/files/$server_id" \
| jq -r '.data.fileName')

echo "-- File Name: $file_name"

curl -Lo "$1" "https://www.curseforge.com/api/v1/mods/$APP_ID/files/$server_id/download"

0 comments on commit d4a7ce7

Please sign in to comment.