forked from lpoaura/BirdAtlasOfFrance
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_dev.sh
executable file
·73 lines (65 loc) · 1.81 KB
/
run_dev.sh
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/bash
# install_back() {
# echo "****************************************"
# echo "* Installation du backend "
# echo "****************************************"
# echo ""
# echo "Téléchargement et installation de PYENV"
# #curl https://pyenv.run | bash
# #git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv
# #exec $SHELL
# echo "Create project virtualenv (odf)"
# cd backend
# pyenv install 3.7.9
# pyenv virtualenv 3.7.9 odf
# pyenv activate odf
# echo ""
# echo "Téléchargement et installation de POETRY"
# echo ""
# curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3 -
# echo "Installation des dépendances du backend"
# cd backend
# poetry install
# }
# install_front() {
# echo "Téléchargement et installation de NVM"
# curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
# echo "Installation des dépendances du frontend"
# cd frontend
# nvm install
# }
dev_back() {
cd backend
poetry run dev_back
}
dev_front() {
cd frontend
nvm use
npm run dev
}
dev_all() {
dev_back &
dev_front
}
for value in $*; do
# if [ $value == "install_back" ]; then
# echo "Starting backend install"
# install_back
# fi
# if [ $value == "install_front" ]; then
# echo "Starting frontend install"
# install_front
# fi
if [ $value == "run_back" ]; then
echo "Starting backend in dev mode"
dev_back
fi
if [ $value == "run_front" ]; then
echo "Starting frontend in dev mode"
dev_front
fi
if [ $value == "run_all" ]; then
echo "Starting frontend in dev mode"
dev_all
fi
done