1 #!/bin/sh2 # 00_tools: uv is the one tool that the base CI image lacks.3 #4 # The docker runner mounts the repository at /work and starts a fresh container5 # for each step, so a tool installed in /usr/local does not survive into the6 # next step. `UV_BIN` names a path inside the mounted tree; installing there7 # makes the next step find the same binary. A local run uses the operator's uv.8 set -eu9 10 if command -v uv >/dev/null 2>&1; then11 uv --version12 exit 013 fi14 if [ -n "${UV_BIN:-}" ] && [ -x "$UV_BIN" ]; then15 "$UV_BIN" --version16 exit 017 fi18 19 if [ -z "${UV_BIN:-}" ]; then20 echo "00_tools: uv is not installed; install uv or set UV_BIN to a writable path" >&221 exit 122 fi23 24 dir=${UV_BIN%/*}25 install -d "$dir"26 curl -LsSf https://astral.sh/uv/0.13.4/install.sh |27 env UV_INSTALL_DIR="$dir" UV_NO_MODIFY_PATH=1 sh28 "$UV_BIN" --version