left/build.sh

43 lines
601 B
Bash
Raw Normal View History

2022-05-27 00:09:52 +01:00
#!/bin/sh -e
2021-01-05 01:26:36 +00:00
2022-09-04 17:55:20 +01:00
ASM="uxncli $HOME/roms/drifblim.rom"
EMU="uxnemu"
LIN="uxncli $HOME/roms/uxnlin.rom"
2022-09-12 17:33:16 +01:00
APP="$HOME/Applications/butler push"
2022-09-04 17:55:20 +01:00
SRC="src/left.tal"
DST="bin/left.rom"
CPY="$HOME/roms"
ARG="src/left.tal"
2022-09-12 17:33:16 +01:00
APPID="hundredrabbits/left:uxn"
2022-09-04 17:55:20 +01:00
echo ">> Cleaning"
2021-07-10 18:25:31 +01:00
rm -rf bin
mkdir bin
2021-01-05 01:26:36 +00:00
2022-09-04 17:55:20 +01:00
if [[ "$*" == *"--lint"* ]]
2022-05-27 00:09:52 +01:00
then
2022-09-04 17:55:20 +01:00
echo ">> Linting $SRC"
2022-09-12 17:33:16 +01:00
$LIN $SRC
2022-05-27 00:09:52 +01:00
fi
2022-09-04 17:55:20 +01:00
echo ">> Assembling $SRC"
$ASM $SRC $DST
2021-01-05 01:26:36 +00:00
2022-09-04 17:55:20 +01:00
if [[ "$*" == *"--save"* ]]
2021-01-05 01:26:36 +00:00
then
2022-09-04 17:55:20 +01:00
echo ">> Saving $DST"
cp $DST $CPY
2021-01-05 01:26:36 +00:00
fi
2022-09-12 17:33:16 +01:00
if [[ "$*" == *"--push"* ]]
then
echo ">> Pushing $DST"
$APP $DST $APPID
fi
2022-09-04 17:55:20 +01:00
echo ">> Running $DST"
$EMU $DST $ARG