#!/bin/sh
# A small wrapper for epydoc
# Based on the pychecker wrapper.

if [ ! ${PYTHONVER} ]; then

        # Since epydoc depends on a python install we needn't worry about
        # the case where there is no python installed unless the admin has done
        # an equivs.  However, we're not in the business of supporting that
        # (and it would be a good idea for the admin to set up alternatives if
        # they do that, anyway).  Note that we assume here that the default
        # python is 2.3, so 2.3 and 2.4 are out-of-order.

        for i in /usr/bin/python \
                /usr/bin/python2.3 \
                /usr/bin/python2.4 \
                /usr/bin/python2.2 \
                /usr/bin/python2.1 \
                `which python`
        do
                [ -x ${i} ] && exec "${i}" /usr/lib/site-python/epydoc/gui.py "$@"
        done
else
        exec python${PYTHONVER} /usr/lib/site-python/epydoc/gui.py "$@"
fi
