summarylogtreecommitdiffstats
path: root/moddb-downloader.sh
blob: abb63e3c339cacf5daaa90ae75a19747c41b8589 (plain)
1
2
3
4
5
6
7
8
9
# An script to download from ModDB

url="${1}"
output="${2}"
resolved_url=$(curl --silent https://${url#moddb://} | grep -Po '(?<=href="/)[^"]*' | head -1)

echo "Downloading ${output}"
curl -L -C - "https://www.moddb.com/${resolved_url}" -o \
  "${output}"