#!/bin/sh
#
# $OpenBSD: INSTALL,v 1.2 2003/12/13 16:03:49 sturm Exp $
#
# Set us up as the default python if there is not one already.
#

set -e
PATH=/bin
PREFIX=${PKG_PREFIX:-/usr/local}

if [ x$2 = xPOST-INSTALL ]
then
	if [ ! -e ${PREFIX}/bin/python ]
	then
		cd ${PREFIX}/bin
		ln -s python2.1 python
	else
		cat <<EOT

+---------------
| ${PREFIX}/bin/python already exists.  If you want to use this
| package as your system default python, make ${PREFIX}/bin/python a
| symlink to ${PREFIX}/bin/python2.1.
+---------------

EOT
	fi

	if [ ! -e ${PREFIX}/bin/pydoc ]
	then
		cd ${PREFIX}/bin
		ln -s pydoc2.1 pydoc
	else
		cat <<EOT

+---------------
| ${PREFIX}/bin/pydoc already exists.  If you want to use this
| package as your system default pydoc, make ${PREFIX}/bin/pydoc a
| symlink to ${PREFIX}/bin/pydoc2.1.
+---------------

EOT
	fi
fi
