about summary refs log tree commit diff stats
path: root/subx/drun
blob: 71b2f0e08e5a6806ed1adb11533bc8ca6664e4f6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env zsh
# Run commonly-used SubX programs using the SubX VM in 'debug mode'.

if [ $# -eq 0 ]
then
  echo "Usage: $0 <binary name without directory> <args>"
  echo
  echo "Naming convention: Binaries starting with 'ex' will be assumed to live in examples/"
  echo "Other binaries will be assumed to live in apps/"
  exit 1
fi

case $1 in
  ex*)
    ./subx --debug --trace run examples/$*
    exit $?
    ;;
  *)
    ./subx --debug --trace run apps/$*
    exit $?
    ;;
esac