2018-07-07 05:49:55 +00:00
|
|
|
#!/usr/bin/env zsh
|
2018-10-26 17:12:51 +00:00
|
|
|
# Run commonly-used SubX programs using the SubX VM.
|
2018-07-07 05:49:55 +00:00
|
|
|
|
|
|
|
if [ $# -eq 0 ]
|
|
|
|
then
|
2018-08-30 08:15:45 +00:00
|
|
|
echo "run <binary> <args>"
|
2018-07-07 05:49:55 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2018-09-01 17:04:58 +00:00
|
|
|
if [[ $1 == 'ex'* ]]
|
|
|
|
then
|
2018-09-21 22:07:42 +00:00
|
|
|
CFLAGS=-g subx run examples/$*
|
2018-09-01 17:04:58 +00:00
|
|
|
exit $?
|
|
|
|
fi
|
|
|
|
|
|
|
|
CFLAGS=-g subx run apps/$*
|
2018-07-07 17:57:56 +00:00
|
|
|
exit $?
|