nxu/uxnrun

24 lines
370 B
Plaintext
Raw Normal View History

2021-12-19 15:57:09 -05:00
#!/bin/sh
2023-07-17 13:21:00 -04:00
#PREFIX="$HOME/w/uxn/bin/"
PREFIX=""
2021-12-23 01:01:00 -05:00
if [ $# -lt 1 ]; then
2023-07-17 13:21:00 -04:00
echo "usage: $0 [-c] [-s N] FILE.tal"
2021-12-23 01:01:00 -05:00
exit 1
fi
2023-07-17 13:21:00 -04:00
ASM="${PREFIX}uxnasm"
CLI="${PREFIX}uxncli"
EMU="${PREFIX}uxnemu"
RUN="$EMU"
2022-01-22 22:55:01 -05:00
case "$1" in
2023-07-17 13:21:00 -04:00
-c) RUN="$CLI"; shift;;
-s) RUN="$EMU -s $2"; shift; shift;;
2022-01-22 22:55:01 -05:00
esac
2022-02-02 17:39:08 -05:00
DEST=$( echo "$1" | sed -re 's#\.tal$#.rom#' )
2023-07-17 13:21:00 -04:00
$ASM $1 $DEST && $RUN $DEST