about summary refs log tree commit diff stats
path: root/subx/drun
blob: 9e802c31c022795e61ed982e8c32af15148a69f0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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 $?