diff options
Diffstat (limited to 'subx/drun')
-rwxr-xr-x | subx/drun | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/subx/drun b/subx/drun new file mode 100755 index 00000000..9e802c31 --- /dev/null +++ b/subx/drun @@ -0,0 +1,17 @@ +#!/usr/bin/env zsh +# Run commonly-used SubX programs using the SubX VM in 'debug mode'. + +if [ $# -eq 0 ] +then + echo "drun <binary> <args>" + exit 1 +fi + +if [[ $1 == 'ex'* ]] +then + CFLAGS=-g ./subx --map --dump run examples/$* 2>x + exit $? +fi + +CFLAGS=-g ./subx --map --dump run apps/$* 2>x +exit $? |