nxu/uxnrun

24 lines
370 B
Bash
Executable File

#!/bin/sh
#PREFIX="$HOME/w/uxn/bin/"
PREFIX=""
if [ $# -lt 1 ]; then
echo "usage: $0 [-c] [-s N] FILE.tal"
exit 1
fi
ASM="${PREFIX}uxnasm"
CLI="${PREFIX}uxncli"
EMU="${PREFIX}uxnemu"
RUN="$EMU"
case "$1" in
-c) RUN="$CLI"; shift;;
-s) RUN="$EMU -s $2"; shift; shift;;
esac
DEST=$( echo "$1" | sed -re 's#\.tal$#.rom#' )
$ASM $1 $DEST && $RUN $DEST