nxu/uxnrun

24 lines
483 B
Plaintext
Raw Normal View History

2021-12-19 15:57:09 -05:00
#!/bin/sh
BIN="$HOME/w/uxn/bin"
2021-12-23 01:01:00 -05:00
if [ $# -lt 1 ]; then
echo "usage: $0 [-c] FILE.tal"
exit 1
fi
2022-02-02 17:39:08 -05:00
RUN='uxnemu'
2022-01-22 22:55:01 -05:00
case "$1" in
2022-02-02 17:39:08 -05:00
-c) RUN='uxncli'; shift;;
-s) RUN="uxnemu -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#' )
$BIN/uxnasm $1 $DEST && $BIN/$RUN $DEST
#case "$1" in
# -c) $BIN/uxnasm $2 $DEST && $BIN/uxncli $DEST;;
# -s) $BIN/uxnasm $3 $DEST && $BIN/uxnemu -s $2 $DEST;;
# *) $BIN/uxnasm $1 $DEST && $BIN/uxnemu $DEST;;
#esac