#!/usr/bin/env bash
set -euo pipefail

MOSAIC_HOME="${MOSAIC_HOME:-$HOME/.config/mosaic}"
SYNC="$MOSAIC_HOME/tools/orchestrator-matrix/controller/tasks_md_sync.py"

if [[ ! -f "$SYNC" ]]; then
  echo "[mosaic-orchestrator-sync] missing sync script: $SYNC" >&2
  exit 1
fi

exec python3 "$SYNC" --repo "$(pwd)" "$@"
