left/build.sh

43 lines
601 B
Bash
Executable File

#!/bin/sh -e
ASM="uxncli $HOME/roms/drifblim.rom"
EMU="uxnemu"
LIN="uxncli $HOME/roms/uxnlin.rom"
APP="$HOME/Applications/butler push"
SRC="src/left.tal"
DST="bin/left.rom"
CPY="$HOME/roms"
ARG="src/left.tal"
APPID="hundredrabbits/left:uxn"
echo ">> Cleaning"
rm -rf bin
mkdir bin
if [[ "$*" == *"--lint"* ]]
then
echo ">> Linting $SRC"
$LIN $SRC
fi
echo ">> Assembling $SRC"
$ASM $SRC $DST
if [[ "$*" == *"--save"* ]]
then
echo ">> Saving $DST"
cp $DST $CPY
fi
if [[ "$*" == *"--push"* ]]
then
echo ">> Pushing $DST"
$APP $DST $APPID
fi
echo ">> Running $DST"
$EMU $DST $ARG