#!/bin/sh
# translate -*-sh-*-

if [ $# -lt 1 ]
then
  PYTHONDIR=../..
else
  PYTHONDIR="$1"
  shift
fi
if [ ! -d "$PYTHONDIR" ]
then
  echo "translate: $PYTHONDIR: not a directory" >&2
  exit 1
fi
if [ $# -lt 1 ]
then BINDIR=../..
else BINDIR="$1"
fi
if [ ! -d "$BINDIR" ]
then
  echo "translate: $BINDIR: not a directory" >&2
  exit 1
fi
latex py2tex.cmd
#ln -sf py2tex.doc py2tex.sty
echo "py2tex $PYTHONDIR/py2tex.py"
py2tex -o py2tex.pt $PYTHONDIR/py2tex.py
echo "py2tex example.py"
py2tex -o example.pt example.py
echo "py2tex definitions.py"
py2tex -o definitions.pt definitions.py
echo "py2tex -d none docstring.py"
py2tex -d none -o docstring-none.pt docstring.py
echo "py2tex -d plain docstring.py"
py2tex -d plain -o docstring-plain.pt docstring.py
echo "py2tex -d struct docstring.py"
py2tex -d struct -o docstring-struct.pt docstring.py
echo "py2tex $BINDIR/py2tex"
py2tex -n -o script.pt $BINDIR/py2tex
