#!/bin/sh
#
# Wrapper around the AVRDUDE Qt / PySide GUI
#
# Prerequisites:
# * python3
# * Qt5 / PySide2, or Qt6 / PySide6

if [ ! -d "/opt/local/share/avrdude" ] ; then
    echo "Installation directory /opt/local/share/avrdude missing" >&2
    exit 1
fi

if [ ! -f "/opt/local/share/avrdude/adgui.py" ] ; then
    echo "Program file /opt/local/share/avrdude/adgui.py missing" >&2
    exit 1
fi

if [ ! -x "/opt/local/bin/python3.14" ] ; then
    echo "Python interpreter /opt/local/bin/python3.14 missing" >&2
    exit 1
fi

exec "/opt/local/bin/python3.14" "/opt/local/share/avrdude/adgui.py"
