oquonie/build.sh

58 lines
1.0 KiB
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/oquonie.tal"
DST="bin/oquonie.rom"
CPY="$HOME/roms"
ARG=""
APPID="hundredrabbits/oquonie:uxn"
echo ">> Cleaning"
rm -rf bin
mkdir bin
uxnasm etc/tools/packer.tal bin/packer.rom
echo "Create floors"
cat etc/f.txt | uxncli bin/packer.rom bin/f.rom
echo "Create walls"
cat etc/w.txt | uxncli bin/packer.rom bin/w.rom
echo "Create steps"
cat etc/s.txt | uxncli bin/packer.rom bin/s.rom
echo "Create characters"
cat etc/c.txt | uxncli bin/packer.rom bin/c.rom
echo "Create blockers"
cat etc/b.txt | uxncli bin/packer.rom bin/b.rom
echo "Create events"
cat etc/e.txt | uxncli bin/packer.rom bin/e.rom
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 -s 3 $DST $ARG