#!/bin/sh -e

ID="sym"
ASM="uxncli $HOME/roms/drifblim.rom"
EMU="uxncli"
LIN="uxncli $HOME/roms/uxnlin.rom"
SRC="${ID}.tal"
DST="${ID}.rom"
CPY="$HOME/roms"
ARG="test.symbols"

if [[ "$*" == *"--lint"* ]]
then
	$LIN $SRC
fi

$ASM $SRC $DST

if [[ "$*" == *"--save"* ]]
then
	cp $DST $CPY
fi

$EMU $DST $ARG