yesod-mirror/third_party/python/uv_compile_wrapper.sh
Copybara 8157b39ea4
Some checks failed
CI / build (push) Failing after 12s
Project import generated by Copybara.
GitOrigin-RevId: 6370f6ea785709295b6abcf9c60717cacf3ac432
2026-01-20 21:26:21 +00:00

27 lines
634 B
Bash
Executable file

#!/bin/bash
set -e
if [[ "$OSTYPE" == "darwin"* ]]; then
SEARCH_PATTERN="uv_macos_aarch64"
else
SEARCH_PATTERN="uv_linux_x86_64"
fi
# Locate the directory containing the uv binary
# We search for a directory in '..' that contains the search pattern in its name
REPO_DIR=$(find .. -type d -name "*${SEARCH_PATTERN}*" | head -n 1)
if [[ -z "$REPO_DIR" ]]; then
echo "Error: Could not find uv repository directory matching *$SEARCH_PATTERN*"
exit 1
fi
UV_PATH="$REPO_DIR/uv"
if [[ ! -f "$UV_PATH" ]]; then
echo "Error: uv binary not found at $UV_PATH"
exit 1
fi
echo "Found uv at: $UV_PATH"
"$UV_PATH" pip compile "$@"