~rabbits/left

92f96b82b6675a5e9713261aceca9a90791318b9 — neauoire 2 months ago 6affcd6
Improved build script
2 files changed, 24 insertions(+), 16 deletions(-)

M build.sh
R src/{main.tal => left.tal}
M build.sh => build.sh +22 -14
@@ 1,26 1,34 @@
#!/bin/sh -e

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

SRC="src/left.tal"
DST="bin/left.rom"

CPY="$HOME/roms"
ETC="src/manifest.tal"
ARG="src/left.tal"

echo ">> Cleaning"
rm -rf bin
mkdir bin

if [ -e "$HOME/roms/uxnlin.rom" ]
if [[ "$*" == *"--lint"* ]]
then
	uxncli $HOME/roms/uxnlin.rom src/main.tal
	uxncli $HOME/roms/uxnlin.rom src/manifest.tal
    echo ">> Linting $SRC"
	$LIN $SRC $ETC
fi

uxncli ~/roms/drifblim.rom # .drifblim

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

uxnemu bin/left.rom src/main.tal # README.md
echo ">> Running $DST"
$EMU $DST $ARG

R src/main.tal => src/left.tal +2 -2
@@ 37,8 37,8 @@
	#f0a6 .System/b DEO2
	;load-theme JSR2
	( size )
	#02a0 .Screen/width DEO2
	#01a0 .Screen/height DEO2
	#02a8 .Screen/width DEO2
	#0180 .Screen/height DEO2
	( cache position )
	.Screen/height DEI2
		DUP2 #0020 SUB2 #04 SFT2 .textarea/lines STZ2