about summary refs log tree commit diff stats
path: root/subx/run
blob: 87fa55695734d15c66d86aa2c60f20e3f2c584ad (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.

if [ $# -eq 0 ]
then
  echo "run <binary> <args>"
  exit 1
fi

if [[ $1 == 'ex'* ]]
then
  CFLAGS=-g ./subx run examples/$*
  exit $?
fi

CFLAGS=-g ./subx run apps/$*
exit $?