Allow returning null when loading game
[gamestick-pjgsapi.git] / bin / extract-all.sh
1 #!/bin/sh
2 # extract all necessary files from a server connect cache file
3 set -e
4
5 if [ $# -lt 1 ]; then
6     echo Error: connect cache json filename missing
7     exit 1
8 fi
9
10 if [ ! -f "$1" ]; then
11     echo Error: connect cache json file does not exist
12     exit 2
13 fi
14
15 thisdir=$(dirname "$0")
16 cachedir=$thisdir/../cache
17
18 $thisdir/extract-uitranslation.sh "$1"\
19     > "$cachedir/connect-uitranslation.min.json"
20
21 $thisdir/extract-popular.php "$1"\
22     > "$cachedir/popular.txt"
23
24 $thisdir/extract-featured.php "$1"\
25     > "$cachedir/featured.json"