-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
Β·38 lines (30 loc) Β· 1.09 KB
/
setup.sh
File metadata and controls
executable file
Β·38 lines (30 loc) Β· 1.09 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
#!/bin/bash
echo "π SnapSum Backend κ°λ° νκ²½ μλ μ€μ μμ..."
# Python λ²μ νμΈ λ° μλ μ€μΉ
if [ -f ".python-version" ]; then
echo "π Python λ²μ ν΅μΌ μ€..."
pyenv install -s $(cat .python-version)
pyenv local $(cat .python-version)
fi
# κ°μνκ²½ μμ± λ° νλ‘μ νΈ μ΄λ¦μΌλ‘ ν둬ννΈ μ€μ
if [ ! -d "venv" ]; then
echo "π κ°μνκ²½ μμ± μ€..."
python -m venv venv --prompt SnapSum
fi
# κ°μνκ²½ νμ±ν
echo "π κ°μνκ²½ νμ±ν"
source venv/bin/activate
# pip μ΅μ λ²μ μ
λ°μ΄νΈ
pip install --upgrade pip
# ν¨ν€μ§ μ€μΉ
pip install -r requirements.txt
# νκ²½ λ³μ νμΌ μ€μ (.env.exampleμ΄ μμΌλ©΄ .env μμ±)
if [ ! -f ".env" ]; then
if [ -f ".env.example" ]; then
cp .env.example .env
echo "β
.env νμΌμ΄ μμ±λμμ΅λλ€. νμνλ©΄ κ°μ μμ νμΈμ."
else
echo "β οΈ .env.example νμΌμ΄ μμ΅λλ€! μλμΌλ‘ .envλ₯Ό μμ±νμΈμ."
fi
fi
echo "π κ°λ° νκ²½ μ€μ μλ£! 'python src/main.py' μ€ννμΈμ."