#!/bin/sh
set -eu

if ! command -v python3 >/dev/null 2>&1; then
	echo "heypi-convert-document: python3 is required for document conversion; install Python 3 or disable attachment document conversion" >&2
	exit 127
fi

script_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
exec python3 "$script_dir/heypi-convert-document.py" "$@"
