2017-05-15 16:18:21 +02:00
|
|
|
#!/bin/bash
|
2017-05-24 13:22:14 +02:00
|
|
|
# Script to update the bundled WiiTDBs.
|
2017-05-15 16:18:21 +02:00
|
|
|
|
|
|
|
set -eu
|
|
|
|
|
|
|
|
dbs=()
|
2018-12-04 21:16:18 +01:00
|
|
|
dbs+=("https://www.gametdb.com/wiitdb.txt?LANG=EN en")
|
2017-05-24 13:22:14 +02:00
|
|
|
# UNIQUE means "only return non-English titles".
|
2018-12-04 21:16:18 +01:00
|
|
|
dbs+=("https://www.gametdb.com/wiitdb.txt?LANG=DE&UNIQUE=TRUE de")
|
|
|
|
dbs+=("https://www.gametdb.com/wiitdb.txt?LANG=ES&UNIQUE=TRUE es")
|
|
|
|
dbs+=("https://www.gametdb.com/wiitdb.txt?LANG=FR&UNIQUE=TRUE fr")
|
|
|
|
dbs+=("https://www.gametdb.com/wiitdb.txt?LANG=IT&UNIQUE=TRUE it")
|
|
|
|
dbs+=("https://www.gametdb.com/wiitdb.txt?LANG=JA&UNIQUE=TRUE ja")
|
|
|
|
dbs+=("https://www.gametdb.com/wiitdb.txt?LANG=KO&UNIQUE=TRUE ko")
|
|
|
|
dbs+=("https://www.gametdb.com/wiitdb.txt?LANG=NL&UNIQUE=TRUE nl")
|
|
|
|
dbs+=("https://www.gametdb.com/wiitdb.txt?LANG=PT&UNIQUE=TRUE pt")
|
|
|
|
dbs+=("https://www.gametdb.com/wiitdb.txt?LANG=RU&UNIQUE=TRUE ru")
|
|
|
|
dbs+=("https://www.gametdb.com/wiitdb.txt?LANG=ZHCN&UNIQUE=TRUE zh_CN")
|
|
|
|
dbs+=("https://www.gametdb.com/wiitdb.txt?LANG=ZHTW&UNIQUE=TRUE zh_TW")
|
2017-05-15 16:18:21 +02:00
|
|
|
|
|
|
|
for i in "${dbs[@]}"
|
|
|
|
do
|
|
|
|
entry=(${i// / })
|
|
|
|
url="${entry[0]}"
|
|
|
|
lang_code="${entry[1]}"
|
|
|
|
|
|
|
|
dest="Data/Sys/wiitdb-$lang_code.txt"
|
|
|
|
echo "Downloading WiiTDB ($lang_code)..."
|
2017-05-24 13:22:14 +02:00
|
|
|
curl -s "$url" > "$dest"
|
2017-05-15 16:18:21 +02:00
|
|
|
done
|