#!/bin/sh

export PYTHONPATH=@SRCDIR@

# prefer the system python, if there is one
python=python
if [ -x /usr/bin/python ]; then
    python=/usr/bin/python
fi

scriptname=$(basename $0 | sed -e 's/[-.]\(beta\|old\|new\)$//')

case $scriptname in
    dexhamster)
        scriptname=hamster
        ;;
    greendex)
        scriptname=icirc
        ;;
esac

exec $python $PYTHONPATH/${scriptname}.py "$@"
