-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
52 lines (42 loc) · 1.47 KB
/
setup.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
#!/bin/bash
if [ ! -f ./backend/.env ]; then
echo "Creating .env file with default values..."
oracle_username=$(dd if=/dev/urandom bs=32 count=1 2>/dev/null | base64)
oracle_password=$(dd if=/dev/urandom bs=32 count=1 2>/dev/null | base64)
echo "oracle_username=$oracle_username" >> ./backend/.env
echo "oracle_password=$oracle_password" >> ./backend/.env
fi
exit
if [ ! -d ./backend/.venv ]; then
echo "Creating and initializing python virtual environment..."
python -m venv ./backend/.venv
echo "Activating the virtual environment..."
source ./backend/.venv/Scripts/activate
pip install -r backend/requirements.txt
fi
if [ -f "./backend/api_start.sh" ]; then
chmod u+rwx "./backend/api_start.sh"
dos2unix "./backend/api_start.sh"
else
echo "Could not find api_start.sh file. Your repository may be corrupted, or need to be re-pulled."
fi
if [ -f "./nuke.sh" ]; then
chmod u+rwx "./nuke.sh"
dos2unix "./nuke.sh"
else
echo "Could not find nuke.sh file. Your repository may be corrupted, or need to be re-pulled."
fi
if [ -f "./run.sh" ]; then
chmod u+rwx "./run.sh"
dos2unix "./run.sh"
else
echo "Could not find run.sh file. Your repository may be corrupted, or need to be re-pulled."
fi
if [ -f "./mini_nuke.sh" ]; then
chmod u+rwx "./mini_nuke.sh"
dos2unix "./mini_nuke.sh"
else
echo "Could not find mini_nuke.sh file. Your repository may be corrupted, or need to be re-pulled."
fi
cd frontend
npm install