forked from BasedHardware/omi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev-init.sh
More file actions
executable file
·43 lines (36 loc) · 1.48 KB
/
Copy pathdev-init.sh
File metadata and controls
executable file
·43 lines (36 loc) · 1.48 KB
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
35
36
37
38
39
40
41
42
43
#!/usr/bin/env bash
set -euo pipefail
# shellcheck source=_resolve_python.sh
source "$(dirname "$0")/_resolve_python.sh"
cd "$(dirname "$0")/../.."
echo "Omi local dev harness — one-time setup"
secrets_file="backend/.env.local-dev"
template="backend/.env.local-dev.template"
if [ ! -f "$secrets_file" ]; then
cp "$template" "$secrets_file"
echo "Created $secrets_file from template"
else
echo "Keeping existing $secrets_file (not overwritten)"
fi
PYTHON_BIN="$(dev_harness_python)"
if [ "$PYTHON_BIN" = "python3" ]; then
python3 -m venv backend/.venv
PYTHON_BIN="$(dev_harness_python)"
echo "Created backend/.venv"
fi
if ! "$PYTHON_BIN" -m pip --version >/dev/null; then
echo "${PYTHON_BIN%/bin/python} is incomplete; recreate it with: python3 -m venv backend/.venv" >&2
exit 1
fi
"$PYTHON_BIN" -m pip install -q -r backend/requirements.txt
echo "Backend Python dependencies installed"
# scripts/install-git-hooks.sh owns hook installation. A linked worktree's
# `.git` is a file holding a gitdir pointer, so a literal `.git/hooks` path does
# not exist there; the installer resolves the shared hook directory with
# `git rev-parse --git-path hooks` and installs dispatchers rather than symlinks
# into a directory every worktree shares.
bash scripts/install-git-hooks.sh
echo ""
echo "Next: add your four API keys to backend/.env.local-dev, then run:"
echo " make dev-up # start the harness for mobile/iOS testing"
echo " make dev-desktop # start the harness and the desktop app"