File indexing completed on 2026-04-09 07:49:18
0001
0002 usage(){ cat << EOU
0003 SName_test.sh
0004 ===============
0005
0006 1. Loads meshname.txt of the geometry configured by
0007 the GEOM envvar thats set in $HOME/.opticks/GEOM/GEOM.sh
0008
0009 2. Dumps the solid names of the geometry
0010
0011 EOU
0012 }
0013
0014 name=SName_test
0015 bin=/tmp/$name
0016
0017 source $HOME/.opticks/GEOM/GEOM.sh
0018
0019 vars="BASH_SOURCE name GEOM"
0020 for var in $vars ; do printf "%20s : %s \n" "$var" "${!var}" ; done
0021
0022 gcc $name.cc -std=c++11 -lstdc++ -I.. -o $bin
0023 [ $? -ne 0 ] && echo $BASH_SOURCE build error && exit 1
0024
0025 $bin
0026 [ $? -ne 0 ] && echo $BASH_SOURCE run error && exit 2
0027
0028 exit 0