uxn-utils/misc/ray/build.sh

35 lines
463 B
Bash
Raw Normal View History

2022-09-10 15:19:31 -04:00
#!/bin/sh -e
ASM="uxncli $HOME/roms/drifblim.rom"
EMU="uxnemu"
LIN="uxncli $HOME/roms/uxnlin.rom"
SRC="src/ray.tal"
DST="bin/ray.rom"
CPY="$HOME/roms"
ETC="src/manifest.tal"
ARG=""
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