uxnlin/build.sh

35 lines
468 B
Bash
Executable File

#!/bin/sh -e
ASM="uxncli $HOME/roms/drifblim.rom"
EMU="uxncli"
LIN="uxncli $HOME/roms/uxnlin.rom"
SRC="src/uxnlin.tal"
DST="bin/uxnlin.rom"
CPY="$HOME/roms"
ETC=""
ARG="etc/example.tal"
echo ">> Cleaning"
rm -rf bin
mkdir bin
if [[ "$*" == *"--lint"* ]]
then
echo ">> Linting $SRC"
$LIN $SRC $ETC
fi
echo ">> Assembling $SRC"
$ASM $SRC $DST
if [[ "$*" == *"--save"* ]]
then
echo ">> Saving $DST"
cp $DST $CPY
fi
echo ">> Running $DST"
$EMU $DST $ARG