1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-24 09:25:01 +00:00
freebsd-ports/mail/fetchmail/files/fetchmailconf.in
Beech Rintoul b67e674ac6 - Update script for chasing _tkinter.so relocation
PR:		ports/176611
Submitted by:	Li-Wen Hsu <lwhsu@FreeBSD.org>
Approved by:	Corey Halpin <chalpin@cs.wisc.edu> (maintainer)
2013-03-03 08:13:07 +00:00

23 lines
746 B
Bash

#!/bin/sh
#
# Wrapper for the real fetchmailconf. Checks whether Python and Tkinter are
# installed, and runs the real fetchmailconf or alerts the user, as appropriate.
#
# $FreeBSD$
LOCALBASE=%%LOCALBASE%%
if [ -x $LOCALBASE/bin/python ] ; then
PYTHON_VERSION=python$(${LOCALBASE}/bin/python -c 'import sys; print sys.version[:3]' 2>/dev/null)
if [ -e ${LOCALBASE}/lib/${PYTHON_VERSION}/lib-dynload/_tkinter.so ]; then
exec ${LOCALBASE}/libexec/fetchmailconf.py "$@"
fi
fi
cat <<EOF
The fetchmailconf program requires Python with Tkinter, which does
not appear to be installed on this system. Python can be found in
the FreeBSD Ports Collection in lang/python, and Tkinter for Python
can be found in x11-toolkits/py-tkinter.
EOF
exit 1