#!/bin/sh
#
# Wrapper for the real fetchmailconf. Checks whether Python is installed,
# and runs the real fetchmailconf or alerts the user, as appropriate.
#

if [ -x /usr/local/bin/python3.12 -a -d /usr/local/lib/python3.12/tkinter -a -d /usr/local/lib/python3.12/site-packages/future ]; then
	exec /usr/local/libexec/fetchmailconf.bin
else
	cat <<EOF
Please install the python3, python-tkinter and py3-future packages, then try
running fetchmailconf again.
EOF
	exit 1
fi
