| 1 | #!/bin/bash |
| 2 | # Script to update the bundled WiiTDBs. |
| 3 | |
| 4 | set -eu |
| 5 | |
| 6 | dbs=() |
| 7 | dbs+=("https://www.gametdb.com/wiitdb.txt?LANG=EN en") |
| 8 | # UNIQUE means "only return non-English titles". |
| 9 | dbs+=("https://www.gametdb.com/wiitdb.txt?LANG=DE&UNIQUE=TRUE de") |
| 10 | dbs+=("https://www.gametdb.com/wiitdb.txt?LANG=ES&UNIQUE=TRUE es") |
| 11 | dbs+=("https://www.gametdb.com/wiitdb.txt?LANG=FR&UNIQUE=TRUE fr") |
| 12 | dbs+=("https://www.gametdb.com/wiitdb.txt?LANG=IT&UNIQUE=TRUE it") |
| 13 | dbs+=("https://www.gametdb.com/wiitdb.txt?LANG=JA&UNIQUE=TRUE ja") |
| 14 | dbs+=("https://www.gametdb.com/wiitdb.txt?LANG=KO&UNIQUE=TRUE ko") |
| 15 | dbs+=("https://www.gametdb.com/wiitdb.txt?LANG=NL&UNIQUE=TRUE nl") |
| 16 | dbs+=("https://www.gametdb.com/wiitdb.txt?LANG=PT&UNIQUE=TRUE pt") |
| 17 | dbs+=("https://www.gametdb.com/wiitdb.txt?LANG=RU&UNIQUE=TRUE ru") |
| 18 | dbs+=("https://www.gametdb.com/wiitdb.txt?LANG=ZHCN&UNIQUE=TRUE zh_CN") |
| 19 | dbs+=("https://www.gametdb.com/wiitdb.txt?LANG=ZHTW&UNIQUE=TRUE zh_TW") |
| 20 | |
| 21 | for i in "${dbs[@]}" |
| 22 | do |
| 23 | entry=(${i// / }) |
| 24 | url="${entry[0]}" |
| 25 | lang_code="${entry[1]}" |
| 26 | |
| 27 | dest="Data/Sys/wiitdb-$lang_code.txt" |
| 28 | echo "Downloading WiiTDB ($lang_code)..." |
| 29 | curl -s "$url" > "$dest" |
| 30 | done |