#!/usr/bin/python3
"""Development-tree and installed launcher for Synex Connections."""

from __future__ import annotations

import sys
from pathlib import Path


def _add_import_path() -> None:
    script_dir = Path(__file__).resolve().parent
    candidates = (script_dir.parent, Path("/usr/lib/synex-connections"))
    for candidate in candidates:
        if (candidate / "synexconnections").is_dir():
            sys.path.insert(0, str(candidate))
            return


_add_import_path()

from synexconnections.app import main  # noqa: E402


if __name__ == "__main__":
    raise SystemExit(main())

