#!/usr/bin/env bash set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" HELPER_SRC="$SCRIPT_DIR/copy_files_to_clipboard.swift" HELPER_BIN="$SCRIPT_DIR/copy_files_to_clipboard" if command -v swiftc >/dev/null 2>&1; then if [[ ! -x "$HELPER_BIN" || "$HELPER_SRC" -nt "$HELPER_BIN" ]]; then swiftc "$HELPER_SRC" -o "$HELPER_BIN" fi else echo "warning: swiftc not found; receiver will run the Swift helper script directly" >&2 fi exec python3 "$SCRIPT_DIR/receiver.py" "$@"