-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·34 lines (28 loc) · 972 Bytes
/
install.sh
File metadata and controls
executable file
·34 lines (28 loc) · 972 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
#
# usage: ./install.sh [VENV_PATH]
#
# VENV_PATH: Optional path for the virtual environment (default: ./.venv).
#
# Creates a virtualenv with uv and installs the package (including proto stub
# generation) with test dependencies.
set -euo pipefail
if ! command -v uv &> /dev/null; then
echo "Error: 'uv' is required but not installed." >&2
echo "Install it with: curl -LsSf https://astral.sh/uv/install.sh | sh" >&2
echo "After installing, open a new shell or run: source ~/.bashrc (or ~/.zshrc)" >&2
exit 1
fi
PROTO_SENTINEL="submodules/tts-service-api/proto/techmo_tts.proto"
if [ ! -f "${PROTO_SENTINEL}" ]; then
echo "Error: submodule 'tts-service-api' is not initialised." >&2
echo "Run ./setup.sh first, then re-run ./install.sh." >&2
exit 1
fi
VENV_PATH="${1:-.venv}"
if [ ! -d "${VENV_PATH}" ]; then
uv venv "${VENV_PATH}"
fi
# shellcheck disable=SC1091
source "${VENV_PATH}/bin/activate"
uv pip install -e "."