#!/bin/bash

# Wrapper for `dtk dol apply` to automatically update dtk symbols from the elf.
# Usage: ./dol-apply [VERSION]
# If VERSION is not provided, it defaults to ce-j.

set -euo pipefail

VERSION=${1:-ce-j}
if [[ "$VERSION" = mm-* ]]
then
    GAME="mm"
else
    GAME="oot"
fi
ninja "build/$VERSION/ok"
build/tools/dtk dol apply "config/$VERSION/config.yml" "build/$VERSION/$GAME-gc.elf"
