#!/usr/bin/env bash

NAME="$1"
PRESET="$2"
PROJECT_PATH="$3"

OUTPUT_PATH="${PROJECT_PATH}/dist/${NAME}"

mkdir -p "${OUTPUT_PATH}"
godot --headless --export-debug "${PRESET}" "${OUTPUT_PATH}/index" "${PROJECT_PATH}/project.godot"