1 files changed, 22 insertions(+), 18 deletions(-)
M build.sh
M build.sh => build.sh +22 -18
@@ 1,30 1,34 @@
#!/bin/sh -e
-echo "Cleaning.."
+ASM="uxncli $HOME/roms/drifblim.rom"
+EMU="uxnemu"
+LIN="uxncli $HOME/roms/uxnlin.rom"
+
+SRC="src/donsol.tal"
+DST="bin/donsol.rom"
+
+CPY="$HOME/roms"
+ETC=""
+ARG=""
+
+echo ">> Cleaning"
rm -rf bin
mkdir bin
-if [ -e "$HOME/roms/uxnlin.rom" ]
+if [[ "$*" == *"--lint"* ]]
then
- echo "Linting.."
- uxncli $HOME/roms/uxnlin.rom src/donsol.tal
+ echo ">> Linting $SRC"
+ $LIN $SRC $ETC
fi
-echo "Assembling.."
-uxnasm src/donsol.tal bin/donsol.rom
-
-echo "Installing.."
-if [ -d "$HOME/roms" ] && [ -e ./bin/donsol.rom ]
-then
- cp ./bin/donsol.rom $HOME/roms
- echo "Installed in $HOME/roms"
-fi
+echo ">> Assembling $SRC"
+$ASM $SRC $DST
-if [ "${1}" = '--push' ];
+if [[ "$*" == *"--save"* ]]
then
- echo "Pushing.."
- ~/Applications/butler push bin/donsol.rom hundredrabbits/donsol:uxn
+ echo ">> Saving $DST"
+ cp $DST $CPY
fi
-echo "Running.."
-uxnemu bin/donsol.rom
+echo ">> Running $DST"
+$EMU $DST $ARG