~rabbits/zombie

8cfd38bf658acefe3c185dca2cf0522b64bfd779 — neauoire 2 years ago 4a78ef7
Use generic build script
2 files changed, 22 insertions(+), 17 deletions(-)

M build.sh
R src/{main.tal => zombie.tal}
M build.sh => build.sh +22 -17
@@ 1,30 1,35 @@
#!/bin/sh -e

echo "Cleaning.."
ASM="uxncli $HOME/roms/drifblim.rom"
EMU="uxnemu"
LIN="uxncli $HOME/roms/uxnlin.rom"

SRC="src/zombie.tal"
DST="bin/zombie.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/main.tal
    echo ">> Linting $SRC"
	$LIN $SRC $ETC
fi

echo "Assembling.."
uxncli ~/roms/drifblim.rom src/main.tal bin/zombie.rom

if [ -d "$HOME/roms" ] && [ -e ./bin/zombie.rom ]
then
	cp ./bin/zombie.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/zombie.rom hundredrabbits/zombie:uxn
    echo ">> Saving $DST"
	cp $DST $CPY
fi

echo "Running.."
uxnemu bin/zombie.rom
echo ">> Running $DST"
$EMU $DST $ARG


R src/main.tal => src/zombie.tal +0 -0