#! /bin/sh

# Run source files through cpp before passing onto glas.  glas should
# be in your path.

if [ $# -lt 1 ] ; then
    echo "usage: `basename $0` file [options]" >&2
    echo "" >&2
    echo "Any options are passed to glas verbatim, but must be" >&2
    echo "placed at the end, with the source file as the very" >&2
    echo "first argument" >&2
    exit 1
fi
TMPFILE="$1.cpp"
cpp $1 > $TMPFILE
shift;
glas $TMPFILE $@

