#!/bin/sh
# polyclav launcher -- generated by scripts/build_wheel.py; do not edit.
BIN="$(dirname "$0")/polyclav-components.bin"
if command -v ldd >/dev/null 2>&1; then
    missing=$(ldd "$BIN" 2>&1 | grep -F 'not found')
    if [ -n "$missing" ]; then
        echo "polyclav: this system is missing libraries polyclav needs:" >&2
        echo >&2
        printf '%s\n' "$missing" >&2
        cat >&2 <<'EOF'

Install them from your distro:
    Debian/Ubuntu: sudo apt install pipewire libasound2 liblilv-0-0
    Fedora:        sudo dnf install pipewire alsa-lib lilv
    Arch:          sudo pacman -S pipewire alsa-lib lilv

A "GLIBC_x.y ... not found" line instead means this distro's glibc is older
than the release binary's baseline -- build from source:
    https://github.com/mschulkind-oss/polyclav#build-from-source
EOF
        exit 127
    fi
fi
exec "$BIN" "$@"
