2021-06-22 14:30:36 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
2020-08-24 19:56:30 -05:00
|
|
|
if [[ $# == 0 || (($1 != "us_1.0") && ($1 != "us_1.1") && ($1 != "eu_1.0") && ($1 != "eu_1.1") && ($1 != "jp"))]]; then
|
2022-03-25 18:23:17 -04:00
|
|
|
echo 'No valid version specified, defaulting to us_1.0...'
|
|
|
|
|
VER="us_1.0"
|
|
|
|
|
else
|
|
|
|
|
VER=$1
|
2020-08-24 19:56:30 -05:00
|
|
|
fi
|
|
|
|
|
|
2020-05-27 19:27:25 -05:00
|
|
|
echo 'Extracting Assets...'
|
2020-06-28 21:11:09 -05:00
|
|
|
|
|
|
|
|
# Remove assets directory if it exists.
|
2022-03-25 18:23:17 -04:00
|
|
|
ASSETS_DIR="./assets/vanilla/$VER"
|
2020-06-28 21:11:09 -05:00
|
|
|
if [ -d "$ASSETS_DIR" ]; then
|
|
|
|
|
rm -r $ASSETS_DIR
|
|
|
|
|
fi
|
|
|
|
|
|
2020-08-15 18:54:40 -05:00
|
|
|
# Remove ucode directory if it exists.
|
2022-03-25 18:23:17 -04:00
|
|
|
UCODE_DIR="./ucode/$VER"
|
2020-08-15 18:54:40 -05:00
|
|
|
if [ -d "$UCODE_DIR" ]; then
|
|
|
|
|
rm -r $UCODE_DIR
|
|
|
|
|
fi
|
|
|
|
|
|
2022-04-10 16:52:42 -04:00
|
|
|
if ! ./tools/dkr_assets_tool -bc "$VER" ./include/enums.h ; then
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
2022-03-25 18:23:17 -04:00
|
|
|
if ! ./tools/dkr_assets_tool -e "$VER" ./assets ./extract-ver ./baseroms . ; then
|
2020-06-28 13:52:22 -05:00
|
|
|
exit 1
|
|
|
|
|
fi
|
2020-06-12 17:28:11 -05:00
|
|
|
|
2020-08-24 19:56:30 -05:00
|
|
|
echo 'Done.'
|
2020-06-28 13:52:22 -05:00
|
|
|
|
2022-03-18 18:35:32 -04:00
|
|
|
exit 0
|