#!/usr/bin/env bash
# Bitbucket Data Center MCP server — generated by mcpify. Do not hand-edit.
set -euo pipefail
cd "$(dirname "$0")/.."

if ! command -v cargo-llvm-cov >/dev/null 2>&1; then
  echo "error: cargo-llvm-cov not found. Install it with:" >&2
  echo "  cargo install cargo-llvm-cov" >&2
  echo "  rustup component add llvm-tools-preview" >&2
  exit 1
fi

mkdir -p target/coverage
cargo llvm-cov --lcov --output-path target/coverage/lcov.info
cargo llvm-cov report --html --output-dir target/coverage

echo
echo "Coverage written to:"
echo "  target/coverage/lcov.info      (machine-readable)"
echo "  target/coverage/html/index.html (human-readable)"
