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
·39 lines (32 loc) · 1008 Bytes
/
Copy pathdev-init.sh
File metadata and controls
executable file
·39 lines (32 loc) · 1008 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
35
36
37
38
39
#!/usr/bin/env bash
set -euo pipefail
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
if [ ! -d backend/venv ]; then
python3 -m venv backend/venv
echo "Created backend/venv"
fi
if [ ! -x backend/venv/bin/pip ]; then
echo "backend/venv is incomplete; recreate it with: python3 -m venv backend/venv" >&2
exit 1
fi
backend/venv/bin/pip install -q -r backend/requirements.txt
echo "Backend Python dependencies installed"
hook=".git/hooks/pre-commit"
if [ ! -f "$hook" ]; then
ln -s -f ../../scripts/pre-commit "$hook"
echo "Installed pre-commit hook"
else
echo "Pre-commit hook already present"
fi
echo ""
echo "Next: add your four API keys to backend/.env.local-dev, then run:"
echo " make dev-desktop"