#!/bin/zsh

# This short script calls texexec to run a conTeXt job
# Richard Koch; September 14, 2001 and May 29, 2006

mytexexecpath="$1"
if [ -x ${mytexexecpath}texexec ]; then
	export PATH="${mytexexecpath}":$PATH
fi

filename="$3"

if [ "$2" = "YES" ]; then
	texexec --pdf --passon=" --interaction=nonstopmode " "${filename}"
else
	texexec --pdf "${filename}"
fi
