about summary refs log blame commit diff stats
path: root/subx/run
blob: cbb3e576fce09d60714be2351d2168c1234dba08 (plain) (tree)
1
2
3
4
5
6
7
8
9
                  
                                                    


               



                                                                                            


        

                    
                                  


         
                            
       
#!/usr/bin/env zsh
# Run commonly-used SubX programs using the SubX VM.

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

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

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