forked from nolanwelch/eric-cte
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run
executable file
·39 lines (31 loc) · 830 Bytes
/
run
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
#!/bin/bash
# All paths relative to this script
cd "$(dirname "$0")"
cfgstr="# KEYS
BOOKEO_API_KEY=\"\"
BOOKEO_SECRET_KEY=\"\"
SLACK_BOT_TOKEN=\"\"
SLACK_SIGNING_SECRET=\"\"
SLING_USERNAME=\"\"
SLING_PASSWORD=\"\"
# FILEPATHS
CAMPUS_ROSTER_PATH=\"data/roster.csv\"
CTE_DB_PATH=\"data/cte.sqlite3\"
MSG_QUEUE_PATH=\"data/msg_queue.json\"
LOG_PATH=\"logs/eric.log\""
CFG_FILE="config.env"
VENV_DIR=".venv/"
if ! [ -f "$CFG_FILE" ]; then
echo "$cfgstr" > "$CFG_FILE"
echo "$CFG_FILE created! Fill it in before running this script again."
exit
fi
if ! [ -d "$VENV_DIR" ]; then
python3 -m venv "$VENV_DIR"
fi
source "$VENV_DIR/bin/activate"
echo "Upgrading pip..."
python3 -m pip install -q --upgrade pip
echo "Installing required modules..."
python3 -m pip install -q -r src/requirements.txt
python3 src/app.py